Installed some nugets

This commit is contained in:
2020-04-23 23:34:24 +02:00
parent d930e505b6
commit 14b47b087d
137 changed files with 41620 additions and 10350 deletions

View File

@ -1,9 +1,9 @@
/*!
* jQuery Validation Plugin v1.17.0
* jQuery Validation Plugin v1.19.1
*
* https://jqueryvalidation.org/
*
* Copyright (c) 2017 Jörn Zaefferer
* Copyright (c) 2019 Jörn Zaefferer
* Released under the MIT license
*/
(function( factory ) {
@ -67,6 +67,7 @@ $.extend( $.fn, {
// Prevent form submit to be able to see console output
event.preventDefault();
}
function handle() {
var hidden, result;
@ -82,7 +83,7 @@ $.extend( $.fn, {
.appendTo( validator.currentForm );
}
if ( validator.settings.submitHandler ) {
if ( validator.settings.submitHandler && !validator.settings.debug ) {
result = validator.settings.submitHandler.call( validator, validator.currentForm, event );
if ( hidden ) {
@ -142,6 +143,7 @@ $.extend( $.fn, {
// https://jqueryvalidation.org/rules/
rules: function( command, argument ) {
var element = this[ 0 ],
isContentEditable = typeof this.attr( "contenteditable" ) !== "undefined" && this.attr( "contenteditable" ) !== "false",
settings, staticRules, existingRules, data, param, filtered;
// If nothing is selected, return empty object; can't chain anyway
@ -149,7 +151,7 @@ $.extend( $.fn, {
return;
}
if ( !element.form && element.hasAttribute( "contenteditable" ) ) {
if ( !element.form && isContentEditable ) {
element.form = this.closest( "form" )[ 0 ];
element.name = this.attr( "name" );
}
@ -393,7 +395,8 @@ $.extend( $.validator, {
this.invalid = {};
this.reset();
var groups = ( this.groups = {} ),
var currentForm = this.currentForm,
groups = ( this.groups = {} ),
rules;
$.each( this.settings.groups, function( key, value ) {
if ( typeof value === "string" ) {
@ -409,13 +412,20 @@ $.extend( $.validator, {
} );
function delegate( event ) {
var isContentEditable = typeof $( this ).attr( "contenteditable" ) !== "undefined" && $( this ).attr( "contenteditable" ) !== "false";
// Set form expando on contenteditable
if ( !this.form && this.hasAttribute( "contenteditable" ) ) {
if ( !this.form && isContentEditable ) {
this.form = $( this ).closest( "form" )[ 0 ];
this.name = $( this ).attr( "name" );
}
// Ignore the element if it belongs to another form. This will happen mainly
// when setting the `form` attribute of an input to the id of another form.
if ( currentForm !== this.form ) {
return;
}
var validator = $.data( this.form, "validator" ),
eventType = "on" + event.type.replace( /^validate/, "" ),
settings = validator.settings;
@ -610,7 +620,7 @@ $.extend( $.validator, {
try {
$( this.findLastActive() || this.errorList.length && this.errorList[ 0 ].element || [] )
.filter( ":visible" )
.focus()
.trigger( "focus" )
// Manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find
.trigger( "focusin" );
@ -639,16 +649,23 @@ $.extend( $.validator, {
.not( this.settings.ignore )
.filter( function() {
var name = this.name || $( this ).attr( "name" ); // For contenteditable
var isContentEditable = typeof $( this ).attr( "contenteditable" ) !== "undefined" && $( this ).attr( "contenteditable" ) !== "false";
if ( !name && validator.settings.debug && window.console ) {
console.error( "%o has no name assigned", this );
}
// Set form expando on contenteditable
if ( this.hasAttribute( "contenteditable" ) ) {
if ( isContentEditable ) {
this.form = $( this ).closest( "form" )[ 0 ];
this.name = name;
}
// Ignore elements that belong to other/nested forms
if ( this.form !== validator.currentForm ) {
return false;
}
// Select only the first element for each name, and only those with rules specified
if ( name in rulesCache || !validator.objectLength( $( this ).rules() ) ) {
return false;
@ -694,6 +711,7 @@ $.extend( $.validator, {
elementValue: function( element ) {
var $element = $( element ),
type = element.type,
isContentEditable = typeof $element.attr( "contenteditable" ) !== "undefined" && $element.attr( "contenteditable" ) !== "false",
val, idx;
if ( type === "radio" || type === "checkbox" ) {
@ -702,7 +720,7 @@ $.extend( $.validator, {
return element.validity.badInput ? "NaN" : $element.val();
}
if ( element.hasAttribute( "contenteditable" ) ) {
if ( isContentEditable ) {
val = $element.text();
} else {
val = $element.val();
@ -763,10 +781,6 @@ $.extend( $.validator, {
if ( normalizer ) {
val = normalizer.call( element, val );
if ( typeof val !== "string" ) {
throw new TypeError( "The normalizer should return a string value." );
}
// Delete the normalizer from rules to avoid treating it as a pre-defined method.
delete rules.normalizer;
}
@ -1142,7 +1156,19 @@ $.extend( $.validator, {
.removeData( "validator" )
.find( ".validate-equalTo-blur" )
.off( ".validate-equalTo" )
.removeClass( "validate-equalTo-blur" );
.removeClass( "validate-equalTo-blur" )
.find( ".validate-lessThan-blur" )
.off( ".validate-lessThan" )
.removeClass( "validate-lessThan-blur" )
.find( ".validate-lessThanEqual-blur" )
.off( ".validate-lessThanEqual" )
.removeClass( "validate-lessThanEqual-blur" )
.find( ".validate-greaterThanEqual-blur" )
.off( ".validate-greaterThanEqual" )
.removeClass( "validate-greaterThanEqual-blur" )
.find( ".validate-greaterThan-blur" )
.off( ".validate-greaterThan" )
.removeClass( "validate-greaterThan-blur" );
}
},
@ -1246,6 +1272,12 @@ $.extend( $.validator, {
for ( method in $.validator.methods ) {
value = $element.data( "rule" + method.charAt( 0 ).toUpperCase() + method.substring( 1 ).toLowerCase() );
// Cast empty attributes like `data-rule-required` to `true`
if ( value === "" ) {
value = true;
}
this.normalizeAttributeRule( rules, type, method, value );
}
return rules;
@ -1371,7 +1403,7 @@ $.extend( $.validator, {
if ( this.checkable( element ) ) {
return this.getLength( value, element ) > 0;
}
return value.length > 0;
return value !== undefined && value !== null && value.length > 0;
},
// https://jqueryvalidation.org/email-method/
@ -1395,9 +1427,26 @@ $.extend( $.validator, {
},
// https://jqueryvalidation.org/date-method/
date: function( value, element ) {
return this.optional( element ) || !/Invalid|NaN/.test( new Date( value ).toString() );
},
date: ( function() {
var called = false;
return function( value, element ) {
if ( !called ) {
called = true;
if ( this.settings.debug && window.console ) {
console.warn(
"The `date` method is deprecated and will be removed in version '2.0.0'.\n" +
"Please don't use it, since it relies on the Date constructor, which\n" +
"behaves very differently across browsers and locales. Use `dateISO`\n" +
"instead or one of the locale specific methods in `localizations/`\n" +
"and `additional-methods.js`."
);
}
}
return this.optional( element ) || !/Invalid|NaN/.test( new Date( value ).toString() );
};
}() ),
// https://jqueryvalidation.org/dateISO-method/
dateISO: function( value, element ) {