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

Pattern attribute should accept regexp objects as well as strings #31

Open
lini opened this issue Oct 16, 2014 · 0 comments
Open

Pattern attribute should accept regexp objects as well as strings #31

lini opened this issue Oct 16, 2014 · 0 comments

Comments

@lini
Copy link

lini commented Oct 16, 2014

Right now the pattern attribute in the schema is always supposed to be a string. However, if we want a regular expression which ignores case, it cannot be done with a string pattern. For example:
pattern: "^Phone" will not match the string "phone"
Even if i change it to "^[Pp]hone" it will not match an input of "PHONE". I would need to use "^[Pp][Hh][Oo][Nn][Ee]" which is ridiculous.

If pattern can be set to /^phone/i or RegExp("^phone", "i") then it will be a lot easier to use.

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

No branches or pull requests

2 participants