regex - Invalid regular expression HTML Pattern -
this regex:
pattern="[^\!\#\$\%\^\&\*\'\|\"]{8}" pattern="[^!#$%^&*'|"]{8}"
how invalid in html input tag? want symbols restricted in textbox
<input placeholder="something" type="text" required autofocus ng-model="somedata" pattern="[^\!\#\$\%\^\&\*\'\|\"]{8}">
i think should pattern=\"[^!#$%^&*'|"]{8}\"
you should escape literal double quote outside []
instead of inside.
Comments
Post a Comment