Answer the question
In order to leave comments, you need to log in
Can't you use flags in regular expressions in the pattern attribute?
Something did not find complete documentation about the pattern attribute.
This is how validation works pattern="^[А-ЯЁ][А-ЯЁа-яё]*?-?[А-ЯЁа-яё]+$"
But not like this pattern="/^[А-ЯЁ][А-ЯЁа-яё]*?-?[А-ЯЁа-яё]+$/g"
How to use regular expression flags?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question