I have a problem here. I know there were a lot of questions related to this, but I couldn't find any useful information. I need to write regular expression
which would allow for user to enter just only letters in all the languages without special characters (f.e #@#%^&43
) and etc.
I've tried this, but this expression doesn't allow to enter any letters or special characters:
/^\p{L}+$/u
And this: this allows to enter just only letters, but without ąčęėįš
:(
/[a-z]+$/
My rule is:
['name', 'match',
'pattern' => '^\p{L}+$',
],
Thank you for any help