@@ -1313,7 +1313,7 @@ $.extend( $.validator, {
1313
1313
1314
1314
// Evaluate parameters
1315
1315
$ . each ( rules , function ( rule , parameter ) {
1316
- rules [ rule ] = $ . isFunction ( parameter ) && rule !== "normalizer" ? parameter ( element ) : parameter ;
1316
+ rules [ rule ] = typeof parameter === "function" && rule !== "normalizer" ? parameter ( element ) : parameter ;
1317
1317
} ) ;
1318
1318
1319
1319
// Clean number parameters
@@ -1325,7 +1325,7 @@ $.extend( $.validator, {
1325
1325
$ . each ( [ "rangelength" , "range" ] , function ( ) {
1326
1326
var parts ;
1327
1327
if ( rules [ this ] ) {
1328
- if ( $ . isArray ( rules [ this ] ) ) {
1328
+ if ( Array . isArray ( rules [ this ] ) ) {
1329
1329
rules [ this ] = [ Number ( rules [ this ] [ 0 ] ) , Number ( rules [ this ] [ 1 ] ) ] ;
1330
1330
} else if ( typeof rules [ this ] === "string" ) {
1331
1331
parts = rules [ this ] . replace ( / [ \[ \] ] / g, "" ) . split ( / [ \s , ] + / ) ;
@@ -1454,19 +1454,19 @@ $.extend( $.validator, {
1454
1454
1455
1455
// https://jqueryvalidation.org/minlength-method/
1456
1456
minlength : function ( value , element , param ) {
1457
- var length = $ . isArray ( value ) ? value . length : this . getLength ( value , element ) ;
1457
+ var length = Array . isArray ( value ) ? value . length : this . getLength ( value , element ) ;
1458
1458
return this . optional ( element ) || length >= param ;
1459
1459
} ,
1460
1460
1461
1461
// https://jqueryvalidation.org/maxlength-method/
1462
1462
maxlength : function ( value , element , param ) {
1463
- var length = $ . isArray ( value ) ? value . length : this . getLength ( value , element ) ;
1463
+ var length = Array . isArray ( value ) ? value . length : this . getLength ( value , element ) ;
1464
1464
return this . optional ( element ) || length <= param ;
1465
1465
} ,
1466
1466
1467
1467
// https://jqueryvalidation.org/rangelength-method/
1468
1468
rangelength : function ( value , element , param ) {
1469
- var length = $ . isArray ( value ) ? value . length : this . getLength ( value , element ) ;
1469
+ var length = Array . isArray ( value ) ? value . length : this . getLength ( value , element ) ;
1470
1470
return this . optional ( element ) || ( length >= param [ 0 ] && length <= param [ 1 ] ) ;
1471
1471
} ,
1472
1472
0 commit comments