Skip to content

Instantly share code, notes, and snippets.

@wrongkitchen
Created November 6, 2012 11:07
Show Gist options
  • Save wrongkitchen/4024052 to your computer and use it in GitHub Desktop.
Save wrongkitchen/4024052 to your computer and use it in GitHub Desktop.
JavaScript: Validate E-Mail
function checkMail(email){
var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
if (filter.test(email)) {
return true;
}
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment