Skip to content

Commit e6c7835

Browse files
authored
Update jquery.validate to 1.20.0
1 parent bce4dd5 commit e6c7835

File tree

8 files changed

+64
-76
lines changed

8 files changed

+64
-76
lines changed

src/Identity/UI/src/assets/V5/lib/jquery-validation/dist/jquery.validate.js

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/*!
2-
* jQuery Validation Plugin v1.21.0
2+
* jQuery Validation Plugin v1.20.0
33
*
44
* https://jqueryvalidation.org/
55
*
6-
* Copyright (c) 2024 Jörn Zaefferer
6+
* Copyright (c) 2023 Jörn Zaefferer
77
* Released under the MIT license
88
*/
99
(function( factory ) {
@@ -293,7 +293,6 @@ $.extend( $.validator, {
293293
onsubmit: true,
294294
ignore: ":hidden",
295295
ignoreTitle: false,
296-
customElements: [],
297296
onfocusin: function( element ) {
298297
this.lastActive = element;
299298

@@ -441,17 +440,17 @@ $.extend( $.validator, {
441440
settings[ eventType ].call( validator, this, event );
442441
}
443442
}
444-
var focusListeners = [ ":text", "[type='password']", "[type='file']", "select", "textarea", "[type='number']", "[type='search']",
445-
"[type='tel']", "[type='url']", "[type='email']", "[type='datetime']", "[type='date']", "[type='month']",
446-
"[type='week']", "[type='time']", "[type='datetime-local']", "[type='range']", "[type='color']",
447-
"[type='radio']", "[type='checkbox']", "[contenteditable]", "[type='button']" ];
448-
var clickListeners = [ "select", "option", "[type='radio']", "[type='checkbox']" ];
443+
449444
$( this.currentForm )
450-
.on( "focusin.validate focusout.validate keyup.validate", focusListeners.concat( this.settings.customElements ).join( ", " ), delegate )
445+
.on( "focusin.validate focusout.validate keyup.validate",
446+
":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], " +
447+
"[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], " +
448+
"[type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], " +
449+
"[type='radio'], [type='checkbox'], [contenteditable], [type='button']", delegate )
451450

452451
// Support: Chrome, oldIE
453452
// "select" is provided as event.target when clicking a option
454-
.on( "click.validate", clickListeners.concat( this.settings.customElements ).join( ", " ), delegate );
453+
.on( "click.validate", "select, option, [type='radio'], [type='checkbox']", delegate );
455454

456455
if ( this.settings.invalidHandler ) {
457456
$( this.currentForm ).on( "invalid-form.validate", this.settings.invalidHandler );
@@ -648,12 +647,11 @@ $.extend( $.validator, {
648647

649648
elements: function() {
650649
var validator = this,
651-
rulesCache = {},
652-
selectors = [ "input", "select", "textarea", "[contenteditable]" ];
650+
rulesCache = {};
653651

654652
// Select all valid inputs inside the form (no submit or reset buttons)
655653
return $( this.currentForm )
656-
.find( selectors.concat( this.settings.customElements ).join( ", " ) )
654+
.find( "input, select, textarea, [contenteditable]" )
657655
.not( ":submit, :reset, :image, :disabled" )
658656
.not( this.settings.ignore )
659657
.filter( function() {
@@ -1503,7 +1501,7 @@ $.extend( $.validator, {
15031501

15041502
// https://jqueryvalidation.org/number-method/
15051503
number: function( value, element ) {
1506-
return this.optional( element ) || /^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:-?\.\d+)?$/.test( value );
1504+
return this.optional( element ) || /^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test( value );
15071505
},
15081506

15091507
// https://jqueryvalidation.org/digits-method/
@@ -1614,12 +1612,11 @@ $.extend( $.validator, {
16141612

16151613
param = typeof param === "string" && { url: param } || param;
16161614
optionDataString = $.param( $.extend( { data: value }, param.data ) );
1617-
if ( previous.valid !== null && previous.old === optionDataString ) {
1615+
if ( previous.old === optionDataString ) {
16181616
return previous.valid;
16191617
}
16201618

16211619
previous.old = optionDataString;
1622-
previous.valid = null;
16231620
validator = this;
16241621
this.startRequest( element );
16251622
data = {};

src/Identity/UI/src/assets/V5/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.

src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/wwwroot/lib/jquery-validation/dist/jquery.validate.js

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/*!
2-
* jQuery Validation Plugin v1.21.0
2+
* jQuery Validation Plugin v1.20.0
33
*
44
* https://jqueryvalidation.org/
55
*
6-
* Copyright (c) 2024 Jörn Zaefferer
6+
* Copyright (c) 2023 Jörn Zaefferer
77
* Released under the MIT license
88
*/
99
(function( factory ) {
@@ -293,7 +293,6 @@ $.extend( $.validator, {
293293
onsubmit: true,
294294
ignore: ":hidden",
295295
ignoreTitle: false,
296-
customElements: [],
297296
onfocusin: function( element ) {
298297
this.lastActive = element;
299298

@@ -441,17 +440,17 @@ $.extend( $.validator, {
441440
settings[ eventType ].call( validator, this, event );
442441
}
443442
}
444-
var focusListeners = [ ":text", "[type='password']", "[type='file']", "select", "textarea", "[type='number']", "[type='search']",
445-
"[type='tel']", "[type='url']", "[type='email']", "[type='datetime']", "[type='date']", "[type='month']",
446-
"[type='week']", "[type='time']", "[type='datetime-local']", "[type='range']", "[type='color']",
447-
"[type='radio']", "[type='checkbox']", "[contenteditable]", "[type='button']" ];
448-
var clickListeners = [ "select", "option", "[type='radio']", "[type='checkbox']" ];
443+
449444
$( this.currentForm )
450-
.on( "focusin.validate focusout.validate keyup.validate", focusListeners.concat( this.settings.customElements ).join( ", " ), delegate )
445+
.on( "focusin.validate focusout.validate keyup.validate",
446+
":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], " +
447+
"[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], " +
448+
"[type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], " +
449+
"[type='radio'], [type='checkbox'], [contenteditable], [type='button']", delegate )
451450

452451
// Support: Chrome, oldIE
453452
// "select" is provided as event.target when clicking a option
454-
.on( "click.validate", clickListeners.concat( this.settings.customElements ).join( ", " ), delegate );
453+
.on( "click.validate", "select, option, [type='radio'], [type='checkbox']", delegate );
455454

456455
if ( this.settings.invalidHandler ) {
457456
$( this.currentForm ).on( "invalid-form.validate", this.settings.invalidHandler );
@@ -648,12 +647,11 @@ $.extend( $.validator, {
648647

649648
elements: function() {
650649
var validator = this,
651-
rulesCache = {},
652-
selectors = [ "input", "select", "textarea", "[contenteditable]" ];
650+
rulesCache = {};
653651

654652
// Select all valid inputs inside the form (no submit or reset buttons)
655653
return $( this.currentForm )
656-
.find( selectors.concat( this.settings.customElements ).join( ", " ) )
654+
.find( "input, select, textarea, [contenteditable]" )
657655
.not( ":submit, :reset, :image, :disabled" )
658656
.not( this.settings.ignore )
659657
.filter( function() {
@@ -1503,7 +1501,7 @@ $.extend( $.validator, {
15031501

15041502
// https://jqueryvalidation.org/number-method/
15051503
number: function( value, element ) {
1506-
return this.optional( element ) || /^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:-?\.\d+)?$/.test( value );
1504+
return this.optional( element ) || /^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test( value );
15071505
},
15081506

15091507
// https://jqueryvalidation.org/digits-method/
@@ -1614,12 +1612,11 @@ $.extend( $.validator, {
16141612

16151613
param = typeof param === "string" && { url: param } || param;
16161614
optionDataString = $.param( $.extend( { data: value }, param.data ) );
1617-
if ( previous.valid !== null && previous.old === optionDataString ) {
1615+
if ( previous.old === optionDataString ) {
16181616
return previous.valid;
16191617
}
16201618

16211619
previous.old = optionDataString;
1622-
previous.valid = null;
16231620
validator = this;
16241621
this.startRequest( element );
16251622
data = {};

src/ProjectTemplates/Web.ProjectTemplates/content/RazorPagesWeb-CSharp/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.

src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/wwwroot/lib/jquery-validation/dist/jquery.validate.js

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/*!
2-
* jQuery Validation Plugin v1.21.0
2+
* jQuery Validation Plugin v1.20.0
33
*
44
* https://jqueryvalidation.org/
55
*
6-
* Copyright (c) 2024 Jörn Zaefferer
6+
* Copyright (c) 2023 Jörn Zaefferer
77
* Released under the MIT license
88
*/
99
(function( factory ) {
@@ -293,7 +293,6 @@ $.extend( $.validator, {
293293
onsubmit: true,
294294
ignore: ":hidden",
295295
ignoreTitle: false,
296-
customElements: [],
297296
onfocusin: function( element ) {
298297
this.lastActive = element;
299298

@@ -441,17 +440,17 @@ $.extend( $.validator, {
441440
settings[ eventType ].call( validator, this, event );
442441
}
443442
}
444-
var focusListeners = [ ":text", "[type='password']", "[type='file']", "select", "textarea", "[type='number']", "[type='search']",
445-
"[type='tel']", "[type='url']", "[type='email']", "[type='datetime']", "[type='date']", "[type='month']",
446-
"[type='week']", "[type='time']", "[type='datetime-local']", "[type='range']", "[type='color']",
447-
"[type='radio']", "[type='checkbox']", "[contenteditable]", "[type='button']" ];
448-
var clickListeners = [ "select", "option", "[type='radio']", "[type='checkbox']" ];
443+
449444
$( this.currentForm )
450-
.on( "focusin.validate focusout.validate keyup.validate", focusListeners.concat( this.settings.customElements ).join( ", " ), delegate )
445+
.on( "focusin.validate focusout.validate keyup.validate",
446+
":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], " +
447+
"[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], " +
448+
"[type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], " +
449+
"[type='radio'], [type='checkbox'], [contenteditable], [type='button']", delegate )
451450

452451
// Support: Chrome, oldIE
453452
// "select" is provided as event.target when clicking a option
454-
.on( "click.validate", clickListeners.concat( this.settings.customElements ).join( ", " ), delegate );
453+
.on( "click.validate", "select, option, [type='radio'], [type='checkbox']", delegate );
455454

456455
if ( this.settings.invalidHandler ) {
457456
$( this.currentForm ).on( "invalid-form.validate", this.settings.invalidHandler );
@@ -648,12 +647,11 @@ $.extend( $.validator, {
648647

649648
elements: function() {
650649
var validator = this,
651-
rulesCache = {},
652-
selectors = [ "input", "select", "textarea", "[contenteditable]" ];
650+
rulesCache = {};
653651

654652
// Select all valid inputs inside the form (no submit or reset buttons)
655653
return $( this.currentForm )
656-
.find( selectors.concat( this.settings.customElements ).join( ", " ) )
654+
.find( "input, select, textarea, [contenteditable]" )
657655
.not( ":submit, :reset, :image, :disabled" )
658656
.not( this.settings.ignore )
659657
.filter( function() {
@@ -1503,7 +1501,7 @@ $.extend( $.validator, {
15031501

15041502
// https://jqueryvalidation.org/number-method/
15051503
number: function( value, element ) {
1506-
return this.optional( element ) || /^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:-?\.\d+)?$/.test( value );
1504+
return this.optional( element ) || /^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test( value );
15071505
},
15081506

15091507
// https://jqueryvalidation.org/digits-method/
@@ -1614,12 +1612,11 @@ $.extend( $.validator, {
16141612

16151613
param = typeof param === "string" && { url: param } || param;
16161614
optionDataString = $.param( $.extend( { data: value }, param.data ) );
1617-
if ( previous.valid !== null && previous.old === optionDataString ) {
1615+
if ( previous.old === optionDataString ) {
16181616
return previous.valid;
16191617
}
16201618

16211619
previous.old = optionDataString;
1622-
previous.valid = null;
16231620
validator = this;
16241621
this.startRequest( element );
16251622
data = {};

src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-CSharp/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.

src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-FSharp/wwwroot/lib/jquery-validation/dist/jquery.validate.js

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/*!
2-
* jQuery Validation Plugin v1.21.0
2+
* jQuery Validation Plugin v1.20.0
33
*
44
* https://jqueryvalidation.org/
55
*
6-
* Copyright (c) 2024 Jörn Zaefferer
6+
* Copyright (c) 2023 Jörn Zaefferer
77
* Released under the MIT license
88
*/
99
(function( factory ) {
@@ -293,7 +293,6 @@ $.extend( $.validator, {
293293
onsubmit: true,
294294
ignore: ":hidden",
295295
ignoreTitle: false,
296-
customElements: [],
297296
onfocusin: function( element ) {
298297
this.lastActive = element;
299298

@@ -441,17 +440,17 @@ $.extend( $.validator, {
441440
settings[ eventType ].call( validator, this, event );
442441
}
443442
}
444-
var focusListeners = [ ":text", "[type='password']", "[type='file']", "select", "textarea", "[type='number']", "[type='search']",
445-
"[type='tel']", "[type='url']", "[type='email']", "[type='datetime']", "[type='date']", "[type='month']",
446-
"[type='week']", "[type='time']", "[type='datetime-local']", "[type='range']", "[type='color']",
447-
"[type='radio']", "[type='checkbox']", "[contenteditable]", "[type='button']" ];
448-
var clickListeners = [ "select", "option", "[type='radio']", "[type='checkbox']" ];
443+
449444
$( this.currentForm )
450-
.on( "focusin.validate focusout.validate keyup.validate", focusListeners.concat( this.settings.customElements ).join( ", " ), delegate )
445+
.on( "focusin.validate focusout.validate keyup.validate",
446+
":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], " +
447+
"[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], " +
448+
"[type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], " +
449+
"[type='radio'], [type='checkbox'], [contenteditable], [type='button']", delegate )
451450

452451
// Support: Chrome, oldIE
453452
// "select" is provided as event.target when clicking a option
454-
.on( "click.validate", clickListeners.concat( this.settings.customElements ).join( ", " ), delegate );
453+
.on( "click.validate", "select, option, [type='radio'], [type='checkbox']", delegate );
455454

456455
if ( this.settings.invalidHandler ) {
457456
$( this.currentForm ).on( "invalid-form.validate", this.settings.invalidHandler );
@@ -648,12 +647,11 @@ $.extend( $.validator, {
648647

649648
elements: function() {
650649
var validator = this,
651-
rulesCache = {},
652-
selectors = [ "input", "select", "textarea", "[contenteditable]" ];
650+
rulesCache = {};
653651

654652
// Select all valid inputs inside the form (no submit or reset buttons)
655653
return $( this.currentForm )
656-
.find( selectors.concat( this.settings.customElements ).join( ", " ) )
654+
.find( "input, select, textarea, [contenteditable]" )
657655
.not( ":submit, :reset, :image, :disabled" )
658656
.not( this.settings.ignore )
659657
.filter( function() {
@@ -1503,7 +1501,7 @@ $.extend( $.validator, {
15031501

15041502
// https://jqueryvalidation.org/number-method/
15051503
number: function( value, element ) {
1506-
return this.optional( element ) || /^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:-?\.\d+)?$/.test( value );
1504+
return this.optional( element ) || /^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test( value );
15071505
},
15081506

15091507
// https://jqueryvalidation.org/digits-method/
@@ -1614,12 +1612,11 @@ $.extend( $.validator, {
16141612

16151613
param = typeof param === "string" && { url: param } || param;
16161614
optionDataString = $.param( $.extend( { data: value }, param.data ) );
1617-
if ( previous.valid !== null && previous.old === optionDataString ) {
1615+
if ( previous.old === optionDataString ) {
16181616
return previous.valid;
16191617
}
16201618

16211619
previous.old = optionDataString;
1622-
previous.valid = null;
16231620
validator = this;
16241621
this.startRequest( element );
16251622
data = {};

src/ProjectTemplates/Web.ProjectTemplates/content/StarterWeb-FSharp/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)