-
Notifications
You must be signed in to change notification settings - Fork 43
Closed
Labels
Description
Scenario: We have 2 date fields, start and end. Start must be before end, and end must be after start.
<input class="pat-date-picker"
id="solution-planning-start"
name="measure.planning_start:records"
type="date"
data-pat-date-picker="output-format: D MMM YYYY; locale: de; week-numbers: show;"
data-pat-validation="not-after: #solution-planning-end; "
/>
<input class="pat-date-picker"
id="solution-planning-end"
name="measure.planning_end:records"
type="date"
data-pat-date-picker="output-format: D MMM YYYY; locale: de; week-numbers: show;"
data-pat-validation="not-before: #solution-planning-start"
/>
In previous versions of pat-validation, if the condition "start must be before end" was not met, both fields were marked is invalid.
It was possible to correct the error in either of the fields. Either by moving start before end, or by moving end after start. The validation error was cleared from both fields (and the form in general).
With the current bundle, the mutual dependency is lost. The validation error only applies to the field that was last changed (start in this case).
Fixing the wrong date in the other field has no effect on the validation error.