Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Javascript
Posted by: Rajib Palit
Added: Jan 23, 2018 7:59 AM
Views: 13
Tags: no tags
Email verification code
  1.     var firstName1 = $(\'#subscription_email1\').val();
  2. var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
  3.  
  4.        if (reg.test(firstName1) == false)
  5.        {
  6.         firstName.closest(\'.form-group\').removeClass(\'has-success\').addClass(\'has-error\');
  7.     e.preventDefault();
  8.        }