Below is simple yet powerful custom javascript email validation function which allows usual user@domain address for your email field.
function validateEmail(txtValue) {
var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
if(reg.test(txtValue) == false) {
return false;
}
return true;
}
No comments:
Post a Comment