Saturday, July 31, 2010

How to validate an email address using JavaScript?

Quick and easy:

function isValidEmail(str) {
return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
}

0 comments:

Post a Comment