function validateEmail(field) {
var regex = /\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b/i;
return (regex.test(field)) ? true : false;
}
function validateMultipleEmailsSemiColonSeparated(value) {
var result = value.split(";");
for (var i = 0; i < result.length; i++)
if (!validateEmail(result[i]))
return false;
return true;
}
No comments:
Post a Comment