Last Updated: February 25, 2016
·
652
· jhernandis

JavaScript:ValidateEMail

Function to validate email addresses:

function ValidateEMail(address) {
    var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
    return reg.test(address);
}