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

Regex Validation Issue - Pipe operator "|" is used as rule separator #126

Open
dominicklee opened this issue Jul 19, 2022 · 1 comment
Open

Comments

@dominicklee
Copy link

Hello, I am having an issue with using Bootstrap Validate for my regex. I must be able to use the pipe operator as part of my regex syntax. Can you please show any alternative to achieve the following:

regex:([0-9]|0[0-9]|1[0-9]|2[0-3]):([0-5][0-9])\s*([AaPp][Mm]):Please enter a valid time

I want to be able to validate text that says "10:30 am" or "9:00am"

Because of the pipe operator. "|" is used as rule separator.

Originally posted by @PascaleBeier in #50 (comment)

@PascaleBeier
Copy link
Collaborator

Hey, thanks for reaching out. This is a limitation of this library and will not be able tackled in the near future. You could use input masking too, e.g. https://imask.js.org/

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

2 participants