Last active
December 9, 2016 20:44
-
-
Save bgantick/a381f29db02bb6dd3f3a460867e14b03 to your computer and use it in GitHub Desktop.
js email validation
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
function validateEmail(uEmail) { | |
var filter = /^(([\w-\.]|([-]|[_]|[.]|[+]))+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/; | |
if (filter.test(uEmail)) { | |
return true; | |
} else { | |
return false; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment