Review main Merged

70060[BUGFIX] Skip range validation if input value and default are both "0"

Nikita Hovratov CR +2 V +2 Normal +95 −26 updated 07/29/21, 15:26

Commit message

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.

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 3

Files 3