Created
July 18, 2017 09:27
-
-
Save NimzyMaina/4a9036a5a83b7f86d036794f9f90b5c4 to your computer and use it in GitHub Desktop.
vaidate domain of an email
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery.validator.methods.email = function( value, element ) { | |
var email = /^([\w-.]+@(gmail|yahoo|hotmail|icloud)(\.+)?[a-zA-Z])\/?/; | |
return email.test(value); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How to use
Simply add this before you instantiate your validator