Hi,
how can i get password length on form in jquery?
I get the password with this:
var sifra=$("#input:password").val();
but when I want to check if password is entered and length is more than 6 characters, it
doesn't work:
if(! sifra){
$("#sifra_p").show();
$("#sifra_p").html("Niste unijeli šifru!");
greska=1;
}
else{
if(sifra.length < 6){
$("#sifra_p").show();
$("#sifra_p").html("Šifra mora imati bar 6 znakova!");
greska=1;
}
else{
$("#sifra_p").hide();
}
}
What could be a problem and what could be a solution. This kind of check works fine
for normally inputs (check, select etc).
Thanks in advance,
Amer