Email javascript validation


/ Published in: JavaScript
Save to your folder(s)

Simple javascript email validation


Copy this code and paste it in your HTML
  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

You need to login to post a comment.