Created
November 15, 2019 15:08
-
-
Save diogoalexsmachado/0cfd20374779b50384d4a3b7dfc68298 to your computer and use it in GitHub Desktop.
completeemail jquery validator method
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
// validação email com mais segurança | |
$.validator.addMethod("completeemail", | |
function(value, element) { | |
return /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(value); | |
}, | |
"O endereço e-mail não é válido" | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment