2
Answers

Password validation

Taimoor Hassan

Taimoor Hassan

10y
805
1
how to validate password that includes (upper letter,numeric and alphabets) in java script in easy way.
Answers (2)
0
Hussain Ahmed

Hussain Ahmed

NA 1.2k 606.2k 10y

Use the following

Minimum 8 characters at least 1 Alphabet and 1 Number: "^(?=.[A-Za-z])(?=.\d)[A-Za-z\d]{8,}$"

Minimum 8 characters at least 1 Alphabet, 1 Number and 1 Special Character:

"^(?=.[A-Za-z])(?=.\d)(?=.[$@$!%#?&])[A-Za-z\d$@$!%*#?&]{8,}$"

Minimum 8 characters at least 1 Uppercase Alphabet, 1 Lowercase Alphabet and 1 Number:

"^(?=.[a-z])(?=.[A-Z])(?=.*\d)[a-zA-Z\d]{8,}$"

Minimum 8 characters at least 1 Uppercase Alphabet, 1 Lowercase Alphabet, 1 Number and 1 Special Character:

"^(?=.[a-z])(?=.[A-Z])(?=.\d)(?=.[$@$!%?&])[A-Za-z\d$@$!%?&]{8,}"

Minimum 8 and Maximum 10 characters at least 1 Uppercase Alphabet, 1 Lowercase Alphabet, 1 Number and 1 Special Character:

"^(?=.[a-z])(?=.[A-Z])(?=.\d)(?=.[$@$!%?&])[A-Za-z\d$@$!%?&]{8,10}"

0
Gopi Chand

Gopi Chand

NA 13.1k 643k 10y
Just follow the link given below:

It will definitely help you.

http://www.c-sharpcorner.com/Blogs/15543/various-types-password-validation-in-javascript.aspx