I want to make validation in an input text field to allow the user to enter only characters
more that 3 char and whitespace is optional.
I wanna also prevent the user from entering more than whitespace like that ” “.
ex. text to pass like that “John Adam”.
I am using this regular expression “a-zA-Z “, but I have a problem when the user enter all
the text white spaces will pass.
thanks.
How about:
[A-Za-z]{3}([A-Za-z]+ ?)*or:
([A-Za-z]+ ?)*if you already verified >=3 chars.