Created
September 17, 2018 20:33
-
-
Save rmrotek/5712baf4733059342bae908fe09863fb to your computer and use it in GitHub Desktop.
email validation js
This file contains hidden or 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(str) { | |
| if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(str)) | |
| { | |
| return (true) | |
| } | |
| return (false) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment