function checkForm(form){ { var temail = document.forgot.email.value; var regular = /\w+@[\w\-\.]+\.[a-z]{2,}/i; var result = temail.match(regular); if (result == null) {alert("- Email address is incorrect!"); return(false) } }; return true; } function checkLogin(form){ { var tlogin = document.fentry.login.value; var reg_login = /[\W]+/g; var res_login = tlogin.match(reg_login); if (res_login != null || tlogin.length < 3) {alert("- The Username length must be (3 - 30) characters!\n- Letter and Numbers Only!"); return(false) } }; { var tpassword = document.fentry.password.value; var reg_password = /[\W]+/g; var res_password = tpassword.match(reg_password); if (res_password != null || tpassword.length < 4) {alert("- The Password length must be (4 - 30) characters!\n- Letter and Numbers Only!"); return(false) } }; return true; }