Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validation of field "Date de sortie" is inconsistent #12

Open
ghiss75 opened this issue Mar 20, 2021 · 2 comments
Open

Validation of field "Date de sortie" is inconsistent #12

ghiss75 opened this issue Mar 20, 2021 · 2 comments

Comments

@ghiss75
Copy link

ghiss75 commented Mar 20, 2021

The validation pattern of the form for "live feedback" is not conforming to the format of the placeholder:
Screenshot 2021-03-20 at 12 09 47

This pattern is expecting something of the format: 20/03/2021:
Screenshot 2021-03-20 at 12 14 44

that is not working because, the pattern does not support year > 2020
Screenshot 2021-03-20 at 12 15 17
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:

'#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)

@usmonster
Copy link

Just to clarify: this last issue is visible only on Safari desktop.

@R4F4L3
Copy link

R4F4L3 commented Mar 23, 2021

The regex pattern dont look like a valid datetime ( UTC or whatever GMT ) filter.
2505-05-45 looks like a valid timestamp :>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants