Skip to content

Instantly share code, notes, and snippets.

@xdmorgan
Created February 5, 2014 17:57
Show Gist options
  • Save xdmorgan/8829554 to your computer and use it in GitHub Desktop.
Save xdmorgan/8829554 to your computer and use it in GitHub Desktop.
regex, handles everything i've thrown at it (that was a legit email) including + signs
function validateEmail(email) {
var re = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
return re.test(email);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment