Valid e-mail adress

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

Checks if value is an e-mail.

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


RSS Icon Subscribe to comments

You need to login to post a comment.