Skip to content

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

@ghiss75

Description

@ghiss75

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions