Created
October 7, 2015 18:57
-
-
Save justinallen/1eda52797ee54397f32a to your computer and use it in GitHub Desktop.
quick basic email validation in javascript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// returns false unless valid | |
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