Skip to content

Commit

Permalink
Localization: Add localized methods for italian culture (it) (#2195)
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco Grossi authored and Arkni committed Jul 31, 2018
1 parent 7c22d68 commit 47e0d92
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/localization/methods_it.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
* Localized default methods for the jQuery validation plugin.
* Locale: IT
*/
$.extend( $.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 47e0d92

Please sign in to comment.