jxu8ha
Last Updated: February 25, 2016
·
177
· maxime

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.