Email javascript validation


 / Published in: JavaScript
 

Simple javascript email validation

  1. function checkMail(email){
  2. var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
  3. if (filter.test(email)) {
  4. return true;
  5. }
  6. return false;
  7. }

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: palako on May 23, 2008

You need to login to post a comment.