Posted By

NyX on 08/17/09


Tagged

email valid


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

vali29


Valid e-mail adress


 / Published in: JavaScript
 

Checks if value is an e-mail.

  1. function isEmail(add) {
  2. if(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,5})+$/.test(add)) {
  3. return true;
  4. }else{
  5. return false;
  6. }
  7. }

Report this snippet  

You need to login to post a comment.