If you want to check email validation using jQuery so you can follow this example:
var email_filter = /^([w-.]+)@(([[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.)|(([w-]+.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(]?)$/; if(!email_filter.test(email)){ $('#email').css('color','red'); $('#email').focus(); return false; } if(email_filter.test(email)){ $('#email').css('color','green'); return true; }
Note: Here #email is the email input field ID name, where you enter your email.
Question and answer is powered by AnsPress.io