Fall 2017 Advisory Overview
function isValidEmail(email) { var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/; if(reg.test(email) == false) { return false; } return true; }
function checkForm(myForm) { var errors = "";
if (myForm.f_firstname.value == "") errors = "Please enter your First Name.\n"; if (myForm.f_lastname.value == "") errors += "Please enter your Last Name.\n"; if (!isValidEmail(myForm.f_email.value)) errors += "Please enter a valid Email.\n";
if (errors != "") { alert(errors); return false; } else { return true; } }