Click here to Skip to main content
15,891,951 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I need a functionality for a password text box which will show the strength of the password like - weak, midium or strong according to the characters entered by the user.

I want to achieve the same using javaScript.
Posted
v3

You can do it by jquery:-
Password Strength Validation[^]

Or you can use Ajax Control Toolkit:-
AJAX Control toolkit PasswordStrength Extender using C#[^]

Hope it will help you.
Best of luck.
 
Share this answer
 
 
Share this answer
 
As per your requirement you can set weak, midium or strong in that password field

Take one criteria length.
weak >if password length is less than 4
medium>if password length is greater than 4 and less than 7
Strong >if password length is greater than 7

HTML
if($("#passwordId").length()<4)
{
   alert("Weak password");
}
else if($("#passwordId").length()>4 && $("#passwordId").length()<7)
{
   alert("medium password");
}
else
{
    alert("strong password");
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900