Posted By

sandrews_06 on 10/15/10


Tagged

email javascript


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

bobbym245
koyotebr


Valid email in javascript


 / Published in: JavaScript
 

  1. function validEmail(address){
  2. var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
  3. if(reg.test(address) == false) {
  4. return false;
  5. }else{
  6. return true;
  7. }
  8. }

Report this snippet  

You need to login to post a comment.