//Find the emailTest() function function emailTest(form) { if (form.email_address.value.indexOf("@", 0) < 0) { alert("This is not a valid e-mail address!"); } else { alert("This could be a valid e-mail address"); } } //Replace it with this new emailTest() function function emailTest(form) { var goodemail = 0; if (form.email_address.value.indexOf("@", 0) < 0) { alert("This is not a valid e-mail address!"); goodemail = 1; } else { var strLength = document.myForm.email_address.value.length; if(strLength < 6 ){ alert("This e-mail address is too short"); goodemail = 1;} } if(goodemail == 0){ alert("This e-mail address is valid and at least six characters long"); }; }