I have a simple javascript form validation, but am trying to add another piece to the "email" area whereas people cannot insert certain emails (hotmail, yahoo, etc.). Does anyone have some intuition as to the direction to point me? Your assistance is greatly appreciated!!!
Code:<script language="JavaScript" type="text/javascript"> //You should create the validator only after the definition of the HTML form var frmvalidator = new Validator("sub"); frmvalidator.addValidation("first_name","req","Please enter your First Name"); frmvalidator.addValidation("last_name","req","Please enter your Last Name"); frmvalidator.addValidation("email","req"); frmvalidator.addValidation("email","email"); frmvalidator.addValidation("phone","req","Please enter your Phone Number ex. 408-555-1234"); frmvalidator.addValidation("state","req","Please enter your State"); </script>
Thanks in advance!
Des
ps. if you have a more thorough javascript validation method and/or code snippet I can incorporate, that would be great.



Reply With Quote

Bookmarks