86660[BUGFIX] Respect already declared return type in `FormEngineValidation`
Commit message
Review
-
Code review CR 0
-
Verified V 0
Issues 2
Files 3
Review log 89
-
Ayke Halder uploaded patch set 1 10/19/24, 20:26
-
Ayke Halder rebased onto patch set 2 10/20/24, 12:57
-
core-ci voted on patch set 2 V +1 10/20/24, 13:06 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68259
-
Andreas Kienast commented on patch set 2 CR -1 10/25/24, 10:36
-
Ayke Halder commented on patch set 2 10/25/24, 20:47
form-engine-validation.ts:192ReplyIf we want to backport, then this "silly-looking check" is needed to make sure, that the UI-behaviour does not change. Checking that the string contains `integer` **at the end** is exactly what makes the UI-behaviour to be the same as before. ---- An acceptance test might look like this: * Use a form input-element `format=integer` (e.g. styleguide TCA demo -> elements basic -> tab: number -> field: number_2) * Put in value `2`, then unfocus. * Check that the value in the visible field is `2`. * Put in value `2.5`, then unfocus. * Check that the value in the visible field is `2` again and not `2.5`. The hidden input that goes to the database has always the value `2`, for both the visible values `2` and `2.5`. If we drop this "silly-looking check", the visible field is not updated, as the hidden value did not change. And thereby the visible value would still show `2.5` - whereas `2` from the hidden field is stored to the databse. ---- In case there will be no backport of this change: Drop the "silly-looking check" and go directly for this implementation: https://review.typo3.org/c/Packages/TYPO3.CMS/+/86662/ -
Andreas Kienast commented on patch set 2 10/28/24, 07:26
form-engine-validation.ts:192ReplyThanks for working on the FormEngine topic. However: I'd prefer to get necessary refactoring done first before adding new features. -
Andreas Kienast commented on patch set 2 10/29/24, 11:38
form-engine-validation.ts:192ReplyI've took a deeper look into the validation stuff now: If I understand your major pain point correctly: you write "0042" into a number field, the value is kept as is (if we use the modified code in line 458), but after saving it becomes "42" again. I noticed that, if I keep using "0042" and then edit the field again and prepend additional numbers, the leading "00" gets removed again, which apparently is another bug in the data normalization. -
Andreas Kienast commented on patch set 2 10/29/24, 12:02
form-engine-validation.ts:192Reply UnresolvedI've pushed an alternative approach: https://review.typo3.org/c/Packages/TYPO3.CMS/+/86822 -
Ayke Halder abandoned the change 10/29/24, 14:10
form-engine-validation.ts:192