-1

Existing code has pattern attribute in for validating a field only in English.
[a-zA-Z0-9]*$

But, new implementation requires supporting multi byte character.
[\\p{Letter}\\p{Mark}\\{Numeric}}]*$/u

This changed not only the pattern, there is a need to add Unicode 'u' flag also.

It was easy to pass old pattern in pattern attribute

pattern="[a-zA-Z0-9]*$"

But, with the new u flag, not sure how to pass this in attribute

pattern="[a-zA-Z0-9]*$, 'u'"

Here is the code for testing.

Pranjal Successena
  • 783
  • 1
  • 9
  • 21

0 Answers0