Commit 2d04af91 authored by Committed by Benni MackBrowse files
[BUGFIX] Skip range validation if input value and default are both "0"
This patch fixes a regression originally introduced in #94103. The problem there was simply an erroneous strict comparison, which further got completely removed in #94527 due to a misconception. The mentioned condition is important for date type fields with a lower range set in TCA. If the user doesn't provide a value for that date field, the range validation should be skipped. Otherwise this empty value would always be interpreted as 0, resulting the validation to change it to the lower range value. As this is a special case, the condition was extracted and rewritten, to only apply for this exact scenario. Other than that the validation should not be skipped. An acceptance test and a unit test are added to ensure this behavior can't break anymore. Resolves: #94621 Related: #94103 Related: #94527 Releases: master, 10.4 Change-Id: I54c1a815077e48064f9f6eeba9584184c5f760d7 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/70060 Tested-by: core-ci <firstname.lastname@example.org> Tested-by: Christian Kuhn <email@example.com> Tested-by: Benni Mack <firstname.lastname@example.org> Reviewed-by: Christian Kuhn <email@example.com> Reviewed-by: Benni Mack <firstname.lastname@example.org>
Showing with 95 additions and 26 deletions