Menu
Hello
I have one problem in form validation using java scripts and regular expressions. I want to have a regulation that if the password contains more than 3 similar characters, it returns an error on indicating the weakness of the password.
The part of the java script concerned is as follow:
re = /.{0,3}/;
if(re.test(myForm.npassword.value)){
alert(“Error: The password can not contain more than 3 similar characters.”);
return false;
}
But it doesn’t work , any comment plz?