Fix: jQuery Unobtrusive Validation Range Number
Change to jQuery Validation broke Unobtrusive Validation. See: https://github.com/jzaefferer/jquery-validation/issues/455
This commit is contained in:
@@ -12466,8 +12466,8 @@ $.format = $.validator.format;
|
|||||||
/// contains the maximum value. The default is "max".</param>
|
/// contains the maximum value. The default is "max".</param>
|
||||||
/// <returns type="jQuery.validator.unobtrusive.adapters" />
|
/// <returns type="jQuery.validator.unobtrusive.adapters" />
|
||||||
return this.add(adapterName, [minAttribute || "min", maxAttribute || "max"], function (options) {
|
return this.add(adapterName, [minAttribute || "min", maxAttribute || "max"], function (options) {
|
||||||
var min = options.params.min,
|
var min = Number(options.params.min),
|
||||||
max = options.params.max;
|
max = Number(options.params.max);
|
||||||
|
|
||||||
if (min && max) {
|
if (min && max) {
|
||||||
setValidationValues(options, minMaxRuleName, [min, max]);
|
setValidationValues(options, minMaxRuleName, [min, max]);
|
||||||
|
|||||||
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -262,8 +262,8 @@
|
|||||||
/// contains the maximum value. The default is "max".</param>
|
/// contains the maximum value. The default is "max".</param>
|
||||||
/// <returns type="jQuery.validator.unobtrusive.adapters" />
|
/// <returns type="jQuery.validator.unobtrusive.adapters" />
|
||||||
return this.add(adapterName, [minAttribute || "min", maxAttribute || "max"], function (options) {
|
return this.add(adapterName, [minAttribute || "min", maxAttribute || "max"], function (options) {
|
||||||
var min = options.params.min,
|
var min = Number(options.params.min),
|
||||||
max = options.params.max;
|
max = Number(options.params.max);
|
||||||
|
|
||||||
if (min && max) {
|
if (min && max) {
|
||||||
setValidationValues(options, minMaxRuleName, [min, max]);
|
setValidationValues(options, minMaxRuleName, [min, max]);
|
||||||
|
|||||||
Reference in New Issue
Block a user