Regex to check password validation -
this question has answer here:
- regex validate password strength 5 answers
i have refered, srinivas's answer make password validation. regex minimum 8 character, 1 number, 1 alphabet , 1 special character
"^(?=.*[a-za-z])(?=.*\d)(?=.*[$@$!%*#?&])[a-za-z\d$@$!%*#?&]{8,}$"
with regex, can use following special characters. $@$!%*#?& . if use dheepan~123
or dheepan.123
vaildation fails. how can allow special characters?
you can allow special char using \w
i'm not sure want this... anyway:
^(?=.*[a-za-z])(?=.*\d)(?=.*[\w])[\w\w]{8,}$
Comments
Post a Comment