Created
July 11, 2012 03:03
-
-
Save alexanmtz/3087709 to your computer and use it in GitHub Desktop.
Novo método do validate
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
// Metodo para validar se a pessoa tem mais de 18 anos, ela serve para ilustrar como usar o addMethod para criar qualquer regra de validação | |
jQuery.validator.addMethod("minAge", function(value, element, params) { | |
return this.optional(element) || value > params; | |
}, "Você precisa ter mais de 18 anos."); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment