Skip to content

Commit

Permalink
Methods: Localized methods for chilean culture (es-CL)
Browse files Browse the repository at this point in the history
Provides `date` and `number` implementations as overrides for `es-CL`

Closes gh-929
  • Loading branch information
maxtoroq authored and jzaefferer committed Jan 14, 2014
1 parent 880ba1c commit cf36b93
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/localization/methods_es_CL.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
* Localized default methods for the jQuery validation plugin.
* Locale: ES_CL
*/
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);
}
});

0 comments on commit cf36b93

Please sign in to comment.