Skip to content

[bug]: Pattern attribute value \d{2}\:\d{2} is not a valid regular expression #1881

Open
@rktyt

Description

@rktyt

What version of design-system are you using?

2.0.0-rc.18

What's Wrong?

The browser reports an error with DateTimePicker and TimePicker.

Pattern attribute value \d{2}\:\d{2} is not a valid regular expression: Uncaught SyntaxError: Invalid regular expression: /\d{2}\:\d{2}/v: Invalid escape

To Reproduce

https://design-system.strapi.io/?path=/docs/inputs-datetimepicker--docs
https://design-system.strapi.io/?path=/docs/inputs-timepicker--docs

Expected Behaviour

Invalid: <input pattern="\d{2}\:\d{2}">
Valid: <input pattern="\d{2}:\d{2}">

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue: bugIssue reporting a bugstatus: pending reproductionWaiting for free time to reproduce the issue, or more information

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions