This regex can help you to check your email-address according to all the criteria which gmail.com used .
var re = /^\w+([-+.'][^\s]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;
var emailFormat = re.test($("#email").val());// this return result in boolean type
if (emailFormat) {}