Posted By

dreamstarter on 04/09/13


Tagged

regex email javascript validation


Versions (?)

Who likes this?

14 people have marked this snippet as a favorite

rinsei
ChristineMeany
maku
cassianogobbet
dreamstarter
shalomfriss
lionminister
Beppoi
JeffSFO
Priestd09
hungquach
williamhillx
Lastree
JulsYa


email validation


 / Published in: JavaScript
 

Use a regex to check the email address input

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

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: ChristineMeany on January 12, 2018

thanks a lot) it helps a lot

Posted By: rehaman on August 5, 2019

The information is very useful

link: https://www.leadmirror.com/

Posted By: riya123 on November 22, 2019

Nice post very helpful information here career ki jankari hindi me

You need to login to post a comment.