mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
Merge pull request #835 from guyvanbael/DE_NL_regex_fix
changes regex for de and nl so dates validate correctly
This commit is contained in:
commit
4930a6744f
@ -12,7 +12,7 @@
|
||||
*/
|
||||
$.extend($.validator.methods, {
|
||||
date: function(value, element) {
|
||||
return this.optional(element) || /^\d\d?\.\d\d?\.\d\d\d?\d?$/.test(value);
|
||||
return this.optional(element) || /^[\d]{1,4}\-[0-1][0-9]\-[0-3][0-9]?$/.test(value);
|
||||
},
|
||||
number: function(value, element) {
|
||||
return this.optional(element) || /^-?(?:\d+|\d{1,3}(?:\.\d{3})+)(?:,\d+)?$/.test(value);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/*! jQuery Validation Plugin - v1.13.1 - 10/14/2014
|
||||
* http://jqueryvalidation.org/
|
||||
* Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */
|
||||
!function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):a(jQuery)}(function(a){a.extend(a.validator.methods,{date:function(a,b){return this.optional(b)||/^\d\d?\.\d\d?\.\d\d\d?\d?$/.test(a)},number:function(a,b){return this.optional(b)||/^-?(?:\d+|\d{1,3}(?:\.\d{3})+)(?:,\d+)?$/.test(a)}})});
|
||||
!function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):a(jQuery)}(function(a){a.extend(a.validator.methods,{date:function(a,b){return this.optional(b)||/^[\d]{1,4}\-[0-1][0-9]\-[0-3][0-9]?$/.test(a)},number:function(a,b){return this.optional(b)||/^-?(?:\d+|\d{1,3}(?:\.\d{3})+)(?:,\d+)?$/.test(a)}})});
|
@ -12,7 +12,7 @@
|
||||
*/
|
||||
$.extend($.validator.methods, {
|
||||
date: function(value, element) {
|
||||
return this.optional(element) || /^\d\d?[\.\/\-]\d\d?[\.\/\-]\d\d\d?\d?$/.test(value);
|
||||
return this.optional(element) || /^[\d]{1,4}\-[0-1][0-9]\-[0-3][0-9]?$/.test(value);
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/*! jQuery Validation Plugin - v1.13.1 - 10/14/2014
|
||||
* http://jqueryvalidation.org/
|
||||
* Copyright (c) 2014 Jörn Zaefferer; Licensed MIT */
|
||||
!function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):a(jQuery)}(function(a){a.extend(a.validator.methods,{date:function(a,b){return this.optional(b)||/^\d\d?[\.\/\-]\d\d?[\.\/\-]\d\d\d?\d?$/.test(a)}})});
|
||||
!function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):a(jQuery)}(function(a){a.extend(a.validator.methods,{date:function(a,b){return this.optional(b)||/^[\d]{1,4}\-[0-1][0-9]\-[0-3][0-9]?$/.test(a)}})});
|
Loading…
Reference in New Issue
Block a user