I have created a validate function using JavaScript. I need a validation that tests that password field in a form to make sure it is:
- At least 8 characters.
- Contains a numeric value.
- Contains an alphabetic value.
I just need an If statement inside my validate function
function Validate()
{
with(document.memberInfo) {
evt = new userInfo(username.value, password.value, email.value, firstname.value, lastname.value, age.value, description.value);
}
with(evt)
{
if((email.indexOf("@",0)==-1))
{
alert("The email must contain the @ symbol.");
return false;
}
evt.printEvent();
}
return true;
}