Verify email address


/ Published in: JavaScript

Allows for forname.o'[email protected]


Copy this code and paste it in your HTML
  1. function validateEmail(email) {
  2. var re = /^(([^<>()[\]\\.,;:\[email protected]\"]+(\.[^<>()[\]\\.,;:\[email protected]\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
  3. var rslt = re.test(email);
  4. return rslt;
  5. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.