I am trying to implement \"alpha\" validation on Arabic alphabet characters input, using the JavaScript regex /[\\u0600-\\u06FF]/
as instructed in this post. I want
You need to add ^
and $
anchors to the regular expression, as well as a +
to allow multiple characters.
Try this:
/^[\u0600-\u06FF]+$/
I'm not sure if "Arabic spaces" that you mentioned are included in the character range there, but if you want to allow white space in the string then just add a \s
inside the []
brackets.