Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Javascript validate email

function validateEmail($email) {
  var emailReg = /^([w-.]+@([w-]+.)+[w-]{2,4})?$/;
  return emailReg.test( $email );
}

if( !validateEmail(emailaddress)) { /* do stuff here */ }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Javascript #validate #email
ADD COMMENT
Topic
Name
8+3 =