methods_fi.js 667 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: FI
  13. */
  14. $.extend( $.validator.methods, {
  15. date: function( value, element ) {
  16. return this.optional( element ) || /^\d{1,2}\.\d{1,2}\.\d{4}$/.test( value );
  17. },
  18. number: function( value, element ) {
  19. return this.optional( element ) || /^-?(?:\d+)(?:,\d+)?$/.test( value );
  20. }
  21. } );
  22. return $;
  23. }));