Advertisement
ZazoTazo

Email Validate

Dec 9th, 2020
1,429
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function ValidateEmail(inputText)
  2. {
  3.     var mailformat = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/;
  4.     if(inputText.value.match(mailformat))
  5.     {
  6.         return true;
  7.     }
  8.     else
  9.     {
  10.         return false;
  11.     }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement