var a="password";
In any variable how to check if the length is not less than 6 characters and not > 12
$(a).len();?????
var a="password";
In any variable how to check if the length is not less than 6 characters and not > 12
$(a).len();?????
No need for jQuery.
if ((a.length < 6) || (a.length > 12)) { error .... }
if (a.length < 6 || a.length > 12) {
alert('Invalid password. It must be between 6 and 12 characters long');
}