In HTML Form - Email validation in javascript here are the steps its easy to do email validation in javascript
JavaScript code to validate an email id
JavaScript code to validate an email id
var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
if (!filter.test(mail)) {
alert('Please provide a valid email address');
email.focus;
return false;
}
if (!filter.test(mail)) {
alert('Please provide a valid email address');
email.focus;
return false;
}
No comments:
Post a Comment