methods_es_CL.js 682 B

123456789101112131415161718192021222324
  1. (function( factory ) {
  2. if ( typeof define === "function" && define.amd ) {
  3. define( ["jquery", "../jquery.validate"], factory );
  4. } else if (typeof module === "object" && module.exports) {
  5. module.exports = factory( require( "jquery" ) );
  6. } else {
  7. factory( jQuery );
  8. }
  9. }(function( $ ) {
  10. /*
  11. * Localized default methods for the jQuery validation plugin.
  12. * Locale: ES_CL
  13. */
  14. $.extend( $.validator.methods, {
  15. date: function( value, element ) {
  16. return this.optional( element ) || /^\d\d?\-\d\d?\-\d\d\d?\d?$/.test( value );
  17. },
  18. number: function( value, element ) {
  19. return this.optional( element ) || /^-?(?:\d+|\d{1,3}(?:\.\d{3})+)(?:,\d+)?$/.test( value );
  20. }
  21. } );
  22. }));