Created
May 26, 2014 17:33
-
-
Save fnalin/a76890b974041e08f5a6 to your computer and use it in GitHub Desktop.
Extensão do jQuery-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
/* | |
* Localized default methods for the jQuery validation plugin. | |
* Locale: PT_BR | |
*/ | |
jQuery.extend(jQuery.validator.methods, { | |
date: function (value, element) { | |
return this.optional(element) || /^\d\d?\/\d\d?\/\d\d\d?\d?$/.test(value); | |
}, | |
number: function (value, element) { | |
return this.optional(element) || /^-?(?:\d+|\d{1,3}(?:\.\d{3})+)(?:,\d+)?$/.test(value); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment