Skip to content

Commit f73292a

Browse files
Updated jQuery Validation Plugin (1.19.2 => 1.19.5)
1 parent cb8f56a commit f73292a

File tree

128 files changed

+2590
-52
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

128 files changed

+2590
-52
lines changed

src/jQueryDatatableServerSideNetCore/wwwroot/lib/jquery-validation/dist/additional-methods.js

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/*!
2-
* jQuery Validation Plugin v1.19.2
2+
* jQuery Validation Plugin v1.19.5
33
*
44
* https://jqueryvalidation.org/
55
*
6-
* Copyright (c) 2020 Jörn Zaefferer
6+
* Copyright (c) 2022 Jörn Zaefferer
77
* Released under the MIT license
88
*/
99
(function( factory ) {
@@ -119,7 +119,7 @@ $.validator.addMethod( "accept", function( value, element, param ) {
119119

120120
$.validator.addMethod( "alphanumeric", function( value, element ) {
121121
return this.optional( element ) || /^\w+$/i.test( value );
122-
}, "Letters, numbers, and underscores only please" );
122+
}, "Letters, numbers, and underscores only please." );
123123

124124
/*
125125
* Dutch bank account numbers (not 'giro' numbers) have 9 digits
@@ -146,13 +146,13 @@ $.validator.addMethod( "bankaccountNL", function( value, element ) {
146146
sum = sum + factor * digit;
147147
}
148148
return sum % 11 === 0;
149-
}, "Please specify a valid bank account number" );
149+
}, "Please specify a valid bank account number." );
150150

151151
$.validator.addMethod( "bankorgiroaccountNL", function( value, element ) {
152152
return this.optional( element ) ||
153153
( $.validator.methods.bankaccountNL.call( this, value, element ) ) ||
154154
( $.validator.methods.giroaccountNL.call( this, value, element ) );
155-
}, "Please specify a valid bank or giro account number" );
155+
}, "Please specify a valid bank or giro account number." );
156156

157157
/**
158158
* BIC is the business identifier code (ISO 9362). This BIC check is not a guarantee for authenticity.
@@ -171,7 +171,7 @@ $.validator.addMethod( "bankorgiroaccountNL", function( value, element ) {
171171
*/
172172
$.validator.addMethod( "bic", function( value, element ) {
173173
return this.optional( element ) || /^([A-Z]{6}[A-Z2-9][A-NP-Z1-9])(X{3}|[A-WY-Z0-9][A-Z0-9]{2})?$/.test( value.toUpperCase() );
174-
}, "Please specify a valid BIC code" );
174+
}, "Please specify a valid BIC code." );
175175

176176
/*
177177
* Código de identificación fiscal ( CIF ) is the tax identification code for Spanish legal entities
@@ -336,7 +336,7 @@ $.validator.addMethod( "cnhBR", function( value ) {
336336

337337
return ( String( firstCN ).concat( secondCN ) === value.substr( -2 ) );
338338

339-
}, "Please specify a valid CNH number" );
339+
}, "Please specify a valid CNH number." );
340340

341341
/*
342342
* Brazillian value number (Cadastrado de Pessoas Juridica).
@@ -411,7 +411,7 @@ $.validator.addMethod( "cnpjBR", function( value, element ) {
411411

412412
return true;
413413

414-
}, "Please specify a CNPJ value number" );
414+
}, "Please specify a CNPJ value number." );
415415

416416
/*
417417
* Brazillian CPF number (Cadastrado de Pessoas Físicas) is the equivalent of a Brazilian tax registration number.
@@ -477,7 +477,7 @@ $.validator.addMethod( "cpfBR", function( value, element ) {
477477
}
478478
return false;
479479

480-
}, "Please specify a valid CPF number" );
480+
}, "Please specify a valid CPF number." );
481481

482482
// https://jqueryvalidation.org/creditcard-method/
483483
// based on https://en.wikipedia.org/wiki/Luhn_algorithm
@@ -630,7 +630,7 @@ $.validator.addMethod( "currency", function( value, element, param ) {
630630
regex = new RegExp( regex );
631631
return this.optional( element ) || regex.test( value );
632632

633-
}, "Please specify a valid currency" );
633+
}, "Please specify a valid currency." );
634634

635635
$.validator.addMethod( "dateFA", function( value, element ) {
636636
return this.optional( element ) || /^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test( value );
@@ -691,7 +691,7 @@ $.validator.addMethod( "extension", function( value, element, param ) {
691691
*/
692692
$.validator.addMethod( "giroaccountNL", function( value, element ) {
693693
return this.optional( element ) || /^[0-9]{1,7}$/.test( value );
694-
}, "Please specify a valid giro account number" );
694+
}, "Please specify a valid giro account number." );
695695

696696
$.validator.addMethod( "greaterThan", function( value, element, param ) {
697697
var target = $( param );
@@ -852,11 +852,11 @@ $.validator.addMethod( "iban", function( value, element ) {
852852
cRest = cOperator % 97;
853853
}
854854
return cRest === 1;
855-
}, "Please specify a valid IBAN" );
855+
}, "Please specify a valid IBAN." );
856856

857857
$.validator.addMethod( "integer", function( value, element ) {
858858
return this.optional( element ) || /^-?\d+$/.test( value );
859-
}, "A positive or negative non-decimal number please" );
859+
}, "A positive or negative non-decimal number please." );
860860

861861
$.validator.addMethod( "ipv4", function( value, element ) {
862862
return this.optional( element ) || /^(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)$/i.test( value );
@@ -892,11 +892,11 @@ $.validator.addMethod( "lessThanEqual", function( value, element, param ) {
892892

893893
$.validator.addMethod( "lettersonly", function( value, element ) {
894894
return this.optional( element ) || /^[a-z]+$/i.test( value );
895-
}, "Letters only please" );
895+
}, "Letters only please." );
896896

897897
$.validator.addMethod( "letterswithbasicpunc", function( value, element ) {
898898
return this.optional( element ) || /^[a-z\-.,()'"\s]+$/i.test( value );
899-
}, "Letters or punctuation only please" );
899+
}, "Letters or punctuation only please." );
900900

901901
// Limit the number of files in a FileList.
902902
$.validator.addMethod( "maxfiles", function( value, element, param ) {
@@ -957,12 +957,12 @@ $.validator.addMethod( "maxsizetotal", function( value, element, param ) {
957957

958958
$.validator.addMethod( "mobileNL", function( value, element ) {
959959
return this.optional( element ) || /^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test( value );
960-
}, "Please specify a valid mobile number" );
960+
}, "Please specify a valid mobile number." );
961961

962962
$.validator.addMethod( "mobileRU", function( phone_number, element ) {
963963
var ruPhone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
964964
return this.optional( element ) || ruPhone_number.length > 9 && /^((\+7|7|8)+([0-9]){10})$/.test( ruPhone_number );
965-
}, "Please specify a valid mobile number" );
965+
}, "Please specify a valid mobile number." );
966966

967967
/* For UK phone functions, do the following server side processing:
968968
* Compare original input with this RegEx pattern:
@@ -976,7 +976,7 @@ $.validator.addMethod( "mobileUK", function( phone_number, element ) {
976976
phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
977977
return this.optional( element ) || phone_number.length > 9 &&
978978
phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/ );
979-
}, "Please specify a valid mobile number" );
979+
}, "Please specify a valid mobile number." );
980980

981981
$.validator.addMethod( "netmask", function( value, element ) {
982982
return this.optional( element ) || /^(254|252|248|240|224|192|128)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(254|252|248|240|224|192|128|0)/i.test( value );
@@ -1132,15 +1132,15 @@ $.validator.addMethod( "nisBR", function( value ) {
11321132
} else {
11331133
return false;
11341134
}
1135-
}, "Please specify a valid NIS/PIS number" );
1135+
}, "Please specify a valid NIS/PIS number." );
11361136

11371137
$.validator.addMethod( "notEqualTo", function( value, element, param ) {
11381138
return this.optional( element ) || !$.validator.methods.equalTo.call( this, value, element, param );
11391139
}, "Please enter a different value, values must not be the same." );
11401140

11411141
$.validator.addMethod( "nowhitespace", function( value, element ) {
11421142
return this.optional( element ) || /^\S+$/i.test( value );
1143-
}, "No white space please" );
1143+
}, "No white space please." );
11441144

11451145
/**
11461146
* Return true if the field value matches the given format RegExp
@@ -1194,7 +1194,7 @@ $.validator.addMethod( "phonePL", function( phone_number, element ) {
11941194
phone_number = phone_number.replace( /\s+/g, "" );
11951195
var regexp = /^(?:(?:(?:\+|00)?48)|(?:\(\+?48\)))?(?:1[2-8]|2[2-69]|3[2-49]|4[1-68]|5[0-9]|6[0-35-9]|[7-8][1-9]|9[145])\d{7}$/;
11961196
return this.optional( element ) || regexp.test( phone_number );
1197-
}, "Please specify a valid phone number" );
1197+
}, "Please specify a valid phone number." );
11981198

11991199
/* For UK phone functions, do the following server side processing:
12001200
* Compare original input with this RegEx pattern:
@@ -1210,7 +1210,7 @@ $.validator.addMethod( "phonesUK", function( phone_number, element ) {
12101210
phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
12111211
return this.optional( element ) || phone_number.length > 9 &&
12121212
phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/ );
1213-
}, "Please specify a valid uk phone number" );
1213+
}, "Please specify a valid uk phone number." );
12141214

12151215
/* For UK phone functions, do the following server side processing:
12161216
* Compare original input with this RegEx pattern:
@@ -1224,7 +1224,7 @@ $.validator.addMethod( "phoneUK", function( phone_number, element ) {
12241224
phone_number = phone_number.replace( /\(|\)|\s+|-/g, "" );
12251225
return this.optional( element ) || phone_number.length > 9 &&
12261226
phone_number.match( /^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/ );
1227-
}, "Please specify a valid phone number" );
1227+
}, "Please specify a valid phone number." );
12281228

12291229
/**
12301230
* Matches US phone number format
@@ -1246,7 +1246,7 @@ $.validator.addMethod( "phoneUS", function( phone_number, element ) {
12461246
phone_number = phone_number.replace( /\s+/g, "" );
12471247
return this.optional( element ) || phone_number.length > 9 &&
12481248
phone_number.match( /^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]\d{2}-?\d{4}$/ );
1249-
}, "Please specify a valid phone number" );
1249+
}, "Please specify a valid phone number." );
12501250

12511251
/*
12521252
* Valida CEPs do brasileiros:
@@ -1275,21 +1275,21 @@ $.validator.addMethod( "postalcodeBR", function( cep_value, element ) {
12751275
*/
12761276
$.validator.addMethod( "postalCodeCA", function( value, element ) {
12771277
return this.optional( element ) || /^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ] *\d[ABCEGHJKLMNPRSTVWXYZ]\d$/i.test( value );
1278-
}, "Please specify a valid postal code" );
1278+
}, "Please specify a valid postal code." );
12791279

12801280
/* Matches Italian postcode (CAP) */
12811281
$.validator.addMethod( "postalcodeIT", function( value, element ) {
12821282
return this.optional( element ) || /^\d{5}$/.test( value );
1283-
}, "Please specify a valid postal code" );
1283+
}, "Please specify a valid postal code." );
12841284

12851285
$.validator.addMethod( "postalcodeNL", function( value, element ) {
12861286
return this.optional( element ) || /^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test( value );
1287-
}, "Please specify a valid postal code" );
1287+
}, "Please specify a valid postal code." );
12881288

12891289
// Matches UK postcode. Does not match to UK Channel Islands that have their own postcodes (non standard UK)
12901290
$.validator.addMethod( "postcodeUK", function( value, element ) {
12911291
return this.optional( element ) || /^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test( value );
1292-
}, "Please specify a valid UK postcode" );
1292+
}, "Please specify a valid UK postcode." );
12931293

12941294
/*
12951295
* Lets you say "at least X inputs that match selector Y must be filled."
@@ -1426,24 +1426,24 @@ $.validator.addMethod( "stateUS", function( value, element, options ) {
14261426

14271427
regex = caseSensitive ? new RegExp( regex ) : new RegExp( regex, "i" );
14281428
return this.optional( element ) || regex.test( value );
1429-
}, "Please specify a valid state" );
1429+
}, "Please specify a valid state." );
14301430

14311431
// TODO check if value starts with <, otherwise don't try stripping anything
14321432
$.validator.addMethod( "strippedminlength", function( value, element, param ) {
14331433
return $( value ).text().length >= param;
1434-
}, $.validator.format( "Please enter at least {0} characters" ) );
1434+
}, $.validator.format( "Please enter at least {0} characters." ) );
14351435

14361436
$.validator.addMethod( "time", function( value, element ) {
14371437
return this.optional( element ) || /^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test( value );
1438-
}, "Please enter a valid time, between 00:00 and 23:59" );
1438+
}, "Please enter a valid time, between 00:00 and 23:59." );
14391439

14401440
$.validator.addMethod( "time12h", function( value, element ) {
14411441
return this.optional( element ) || /^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test( value );
1442-
}, "Please enter a valid time in 12-hour am/pm format" );
1442+
}, "Please enter a valid time in 12-hour am/pm format." );
14431443

14441444
// Same as url, but TLD is optional
14451445
$.validator.addMethod( "url2", function( value, element ) {
1446-
return this.optional( element ) || /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test( value );
1446+
return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?)|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff])|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62}\.)))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
14471447
}, $.validator.messages.url );
14481448

14491449
/**
@@ -1503,10 +1503,10 @@ $.validator.addMethod( "vinUS", function( v ) {
15031503

15041504
$.validator.addMethod( "zipcodeUS", function( value, element ) {
15051505
return this.optional( element ) || /^\d{5}(-\d{4})?$/.test( value );
1506-
}, "The specified US ZIP Code is invalid" );
1506+
}, "The specified US ZIP Code is invalid." );
15071507

15081508
$.validator.addMethod( "ziprange", function( value, element ) {
15091509
return this.optional( element ) || /^90[2-5]\d\{2\}-\d{4}$/.test( value );
1510-
}, "Your ZIP-code must be in the range 902xx-xxxx to 905xx-xxxx" );
1510+
}, "Your ZIP-code must be in the range 902xx-xxxx to 905xx-xxxx." );
15111511
return $;
15121512
}));

src/jQueryDatatableServerSideNetCore/wwwroot/lib/jquery-validation/dist/additional-methods.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/jQueryDatatableServerSideNetCore/wwwroot/lib/jquery-validation/dist/jquery.validate.js

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/*!
2-
* jQuery Validation Plugin v1.19.2
2+
* jQuery Validation Plugin v1.19.5
33
*
44
* https://jqueryvalidation.org/
55
*
6-
* Copyright (c) 2020 Jörn Zaefferer
6+
* Copyright (c) 2022 Jörn Zaefferer
77
* Released under the MIT license
88
*/
99
(function( factory ) {
@@ -1050,6 +1050,10 @@ $.extend( $.validator, {
10501050
// meta-characters that should be escaped in order to be used with JQuery
10511051
// as a literal part of a name/id or any selector.
10521052
escapeCssMeta: function( string ) {
1053+
if ( string === undefined ) {
1054+
return "";
1055+
}
1056+
10531057
return string.replace( /([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g, "\\$1" );
10541058
},
10551059

@@ -1126,8 +1130,8 @@ $.extend( $.validator, {
11261130
}
11271131
delete this.pending[ element.name ];
11281132
$( element ).removeClass( this.settings.pendingClass );
1129-
if ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() ) {
1130-
$( this.currentForm ).submit();
1133+
if ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() && this.pendingRequest === 0 ) {
1134+
$( this.currentForm ).trigger( "submit" );
11311135

11321136
// Remove the hidden input that was used as a replacement for the
11331137
// missing submit button. The hidden input is added by `handle()`
@@ -1232,7 +1236,7 @@ $.extend( $.validator, {
12321236

12331237
// Exception: the jquery validate 'range' method
12341238
// does not test for the html5 'range' type
1235-
rules[ method ] = true;
1239+
rules[ type === "date" ? "dateISO" : method ] = true;
12361240
}
12371241
},
12381242

@@ -1331,7 +1335,7 @@ $.extend( $.validator, {
13311335

13321336
// Evaluate parameters
13331337
$.each( rules, function( rule, parameter ) {
1334-
rules[ rule ] = $.isFunction( parameter ) && rule !== "normalizer" ? parameter( element ) : parameter;
1338+
rules[ rule ] = typeof parameter === "function" && rule !== "normalizer" ? parameter( element ) : parameter;
13351339
} );
13361340

13371341
// Clean number parameters
@@ -1343,7 +1347,7 @@ $.extend( $.validator, {
13431347
$.each( [ "rangelength", "range" ], function() {
13441348
var parts;
13451349
if ( rules[ this ] ) {
1346-
if ( $.isArray( rules[ this ] ) ) {
1350+
if ( Array.isArray( rules[ this ] ) ) {
13471351
rules[ this ] = [ Number( rules[ this ][ 0 ] ), Number( rules[ this ][ 1 ] ) ];
13481352
} else if ( typeof rules[ this ] === "string" ) {
13491353
parts = rules[ this ].replace( /[\[\]]/g, "" ).split( /[\s,]+/ );
@@ -1430,7 +1434,7 @@ $.extend( $.validator, {
14301434
// https://gist.github.com/dperini/729294
14311435
// see also https://mathiasbynens.be/demo/url-regex
14321436
// modified to allow protocol-relative URLs
1433-
return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
1437+
return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
14341438
},
14351439

14361440
// https://jqueryvalidation.org/date-method/
@@ -1472,19 +1476,19 @@ $.extend( $.validator, {
14721476

14731477
// https://jqueryvalidation.org/minlength-method/
14741478
minlength: function( value, element, param ) {
1475-
var length = $.isArray( value ) ? value.length : this.getLength( value, element );
1479+
var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
14761480
return this.optional( element ) || length >= param;
14771481
},
14781482

14791483
// https://jqueryvalidation.org/maxlength-method/
14801484
maxlength: function( value, element, param ) {
1481-
var length = $.isArray( value ) ? value.length : this.getLength( value, element );
1485+
var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
14821486
return this.optional( element ) || length <= param;
14831487
},
14841488

14851489
// https://jqueryvalidation.org/rangelength-method/
14861490
rangelength: function( value, element, param ) {
1487-
var length = $.isArray( value ) ? value.length : this.getLength( value, element );
1491+
var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
14881492
return this.optional( element ) || ( length >= param[ 0 ] && length <= param[ 1 ] );
14891493
},
14901494

src/jQueryDatatableServerSideNetCore/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)