Closed adamenveil closed 2 years ago
Closing because I realize it's just setting the pattern
attribute on a normal <input>
element, and the pattern attribute is fairly limited. https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern
Unable to specify a regex pattern using flags.
For instance, this is a valid regex:
However, this regex is not able to be supplied as a
pattern
in a schema:I have tried it without wrapping the pattern in a string, just specifying
/^[a-z]+$/i
and that doesn't seem to work either.I am able to use regex pattern strings without the
/
and without flags, such as pattern: "^[a-zA-Z]+$", which can achieve the same result in this scenario. But there are many times when flags would be MUCH more preferable than adding a bunch of extra modifiers into the expression.