Email Validation Regex


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

Email Validation Regex from Gloonark.


Copy this code and paste it in your HTML
  1. function validateEmail(elementValue){
  2. var emailPattern = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/;
  3. return emailPattern.test(elementValue);
  4. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.