Tag: amp char length Other password asc long BST arc
Checkpassword = function (v) {
var numasc = 0;
var charasc = 0;
var otherasc = 0;
if (0==v.length) {
Return "Password cannot be empty";
}else if (v.length<8| |v.length>12) {
Return "Password at least 8 characters, maximum of 12 characters";
}else{
for (var i = 0; i < v.length; i++) {
var asciinumber = V.substr (i, 1). charCodeAt ();
if (asciinumber >= && asciinumber <= 57) {
NUMASC + = 1;
}
if ((Asciinumber >= && asciinumber <= 90) | | (Asciinumber >= && asciinumber <= 122)) {
CHARASC + = 1;
}
if ((Asciinumber >= && asciinumber <= 47) | | (Asciinumber >= && asciinumber <= 64) | | (Asciinumber >= && asciinumber <= 96) | | (Asciinumber >= 123 && asciinumber <= 126)) {
OTHERASC + = 1;
}
}
if (0==NUMASC) {
Return "Password must contain a number";
}else if (0==CHARASC) {
Return "Password must contain letters";
}else if (0==OTHERASC) {
Return "Password must contain special characters";
}else{
return true;
}
}
};
JS authentication password can not be empty, must contain numbers, letters, special characters, length in 8-12 bits