-
Notifications
You must be signed in to change notification settings - Fork 22
Description
The validation pattern of the form for "live feedback" is not conforming to the format of the placeholder:
This pattern is expecting something of the format: 20/03/2021:
that is not working because, the pattern does not support year > 2020
Note: A pull request fixing this issue has already been proposed: #9
Still, there is another issue as when the form is submitted, the field is validated with following pattern:
attestation-deplacement-derogatoire-covid-19/src/js/form-util.js
Lines 34 to 36 in 1fc8aed
'#field-datesortie': { | |
pattern: /\d{4}-\d{2}-\d{2}/g, | |
}, |
that is expecting the same format as the placeholder.
From a user perspective it could be confusing as when entering a date conforming to the placeholder, the "live feedback" will indicate an incorrect input, still the form will be validated when clicking on the generate button.
Originally posted by @ghiss75 in #2 (comment)