I am trying to implement maximum case in JavaScript for password validation.
I have a scenario where in password user should enter maximum 5 characters (a-z,A-Z) and password length having no restriction
- Passsword length no limit
- except (a-z,A-Z) ,there is no limtation
- charcter(a-z,A-Z) will have atmost 5 in password .Not more than that.Sequence doesnot matter.
I tried /[^A-Z,a-z]*(?:[A-Z,a-z][^A-Z,a-z]*){0,5}/
But it is not working. Kindly help