I want to check password length that should be minimum 6 characters long .
How can i do that?
I want to check password length that should be minimum 6 characters long .
How can i do that?
u can use the password.length feature of javascript to calculate the length and then compare it using if-else conditional statement...
function checkStrong(sPW){
if (sPW.length<=4)
return 0;
Modes=0;
for (i=0;i<sPW.length;i++){
Modes|=CharMode(sPW.charCodeAt(i));
}
return bitTotal(Modes);
}
Best swiss mado watches site for sale!
If you just want to check the length then use length property to check the length of the text in textbox
If your issue is still not resolved, you may try this:
Let me know, if you would need any further help.var password = "password";
var passed = validatePassword(password, {
length: [6, Infinity],
lower: 1,
upper: 1,
numeric: 1,
special: 1,
badWords: ["password", "steven", "levithan"],
badSequenceLength: 4
});
// passed: false
Bookmarks