Check a valid mail in JavaScript
A useful one-liner.
function is_email(id){return (/^([\w!.%+\-\*])+@([\w\-])+(?:\.[\w\-]+)+$/).test(id);}
Did not pass for IPv6 e-mails, but again, who cares.
Written by Maxime VALETTE
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Javascript
Authors
Related Tags
#javascript
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#