Upgrade jquery validate

This commit is contained in:
2019-11-26 14:36:29 -05:00
parent f4a5518c30
commit f69cf46c79
5 changed files with 40 additions and 51 deletions
+1 -1
View File
@@ -806,9 +806,9 @@
<Content Include="scripts\jquery.validate.min.js" /> <Content Include="scripts\jquery.validate.min.js" />
<Content Include="scripts\jquery.validate.unobtrusive.bootstrap.js" /> <Content Include="scripts\jquery.validate.unobtrusive.bootstrap.js" />
<Content Include="scripts\jquery.validate.unobtrusive.bootstrap.min.js" /> <Content Include="scripts\jquery.validate.unobtrusive.bootstrap.min.js" />
<Content Include="scripts\jquery.validate.custom.js" />
<Content Include="scripts\jquery.validate.unobtrusive.js" /> <Content Include="scripts\jquery.validate.unobtrusive.js" />
<Content Include="scripts\jquery.validate.unobtrusive.min.js" /> <Content Include="scripts\jquery.validate.unobtrusive.min.js" />
<Content Include="scripts\jquery.validate.custom.js" />
<Content Include="scripts\LeafInputCreate.js" /> <Content Include="scripts\LeafInputCreate.js" />
<Content Include="scripts\popper-utils.js" /> <Content Include="scripts\popper-utils.js" />
<Content Include="scripts\popper-utils.min.js" /> <Content Include="scripts\popper-utils.min.js" />
+1 -1
View File
@@ -44,7 +44,7 @@
<package id="Microsoft.CodeAnalysis.CSharp" version="1.0.0" targetFramework="net452" /> <package id="Microsoft.CodeAnalysis.CSharp" version="1.0.0" targetFramework="net452" />
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="2.0.1" targetFramework="net452" /> <package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="2.0.1" targetFramework="net452" />
<package id="Microsoft.IO.RecyclableMemoryStream" version="1.2.2" targetFramework="net452" /> <package id="Microsoft.IO.RecyclableMemoryStream" version="1.2.2" targetFramework="net452" />
<package id="Microsoft.jQuery.Unobtrusive.Validation" version="3.2.3" targetFramework="net452" /> <package id="Microsoft.jQuery.Unobtrusive.Validation" version="3.2.11" targetFramework="net452" />
<package id="Microsoft.Net.Compilers" version="1.0.0" targetFramework="net452" developmentDependency="true" /> <package id="Microsoft.Net.Compilers" version="1.0.0" targetFramework="net452" developmentDependency="true" />
<package id="Microsoft.NETCore.Platforms" version="1.1.0" targetFramework="net452" /> <package id="Microsoft.NETCore.Platforms" version="1.1.0" targetFramework="net452" />
<package id="Microsoft.Owin" version="4.1.0" targetFramework="net452" /> <package id="Microsoft.Owin" version="4.1.0" targetFramework="net452" />
+27 -24
View File
@@ -1,26 +1,23 @@
/* NUGET: BEGIN LICENSE TEXT // Unobtrusive validation support library for jQuery and jQuery Validate
* // Copyright (c) .NET Foundation. All rights reserved.
* Microsoft grants you the right to use these script files for the sole // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
* purpose of either: (i) interacting through your browser with the Microsoft // @version v3.2.11
* website or online service, subject to the applicable licensing or use
* terms; or (ii) using the files as included with a Microsoft product subject
* to that product's license terms. Microsoft reserves all other rights to the
* files not expressly granted by Microsoft, whether by implication, estoppel
* or otherwise. Insofar as a script file is dual licensed under GPL,
* Microsoft neither took the code under GPL nor distributes it thereunder but
* under the terms set out in this paragraph. All notices and licenses
* below are for informational purposes only.
*
* NUGET: END LICENSE TEXT */
/*!
** Unobtrusive validation support library for jQuery and jQuery Validate
** Copyright (C) Microsoft Corporation. All rights reserved.
*/
/*jslint white: true, browser: true, onevar: true, undef: true, nomen: true, eqeqeq: true, plusplus: true, bitwise: true, regexp: true, newcap: true, immed: true, strict: false */ /*jslint white: true, browser: true, onevar: true, undef: true, nomen: true, eqeqeq: true, plusplus: true, bitwise: true, regexp: true, newcap: true, immed: true, strict: false */
/*global document: false, jQuery: false */ /*global document: false, jQuery: false */
(function ($) { (function (factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define("jquery.validate.unobtrusive", ['jquery-validation'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports
module.exports = factory(require('jquery-validation'));
} else {
// Browser global
jQuery.validator.unobtrusive = factory(jQuery);
}
}(function ($) {
var $jQval = $.validator, var $jQval = $.validator,
adapters, adapters,
data_validation = "unobtrusiveValidation"; data_validation = "unobtrusiveValidation";
@@ -84,11 +81,12 @@
} }
function onSuccess(error) { // 'this' is the form element function onSuccess(error) { // 'this' is the form element
var container = error.data("unobtrusiveContainer"), var container = error.data("unobtrusiveContainer");
replaceAttrValue = container.attr("data-valmsg-replace"),
replace = replaceAttrValue ? $.parseJSON(replaceAttrValue) : null;
if (container) { if (container) {
var replaceAttrValue = container.attr("data-valmsg-replace"),
replace = replaceAttrValue ? $.parseJSON(replaceAttrValue) : null;
container.addClass("field-validation-valid").removeClass("field-validation-error"); container.addClass("field-validation-valid").removeClass("field-validation-error");
error.removeData("unobtrusiveContainer"); error.removeData("unobtrusiveContainer");
@@ -131,7 +129,7 @@
execInContext = function (name, args) { execInContext = function (name, args) {
var func = defaultOptions[name]; var func = defaultOptions[name];
func && $.isFunction(func) && func.apply(form, args); func && $.isFunction(func) && func.apply(form, args);
} };
if (!result) { if (!result) {
result = { result = {
@@ -422,8 +420,13 @@
setValidationValues(options, "regex", options.params.regex); setValidationValues(options, "regex", options.params.regex);
} }
}); });
adapters.add("fileextensions", ["extensions"], function (options) {
setValidationValues(options, "extension", options.params.extensions);
});
$(function () { $(function () {
$jQval.unobtrusive.parse(document); $jQval.unobtrusive.parse(document);
}); });
}(jQuery));
return $jQval.unobtrusive;
}));
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -42,7 +42,7 @@
$($el).height('auto'); $($el).height('auto');
topPostion = $el.position().top; topPostion = $el.position().top;
if (currentRowStart != topPostion) { if (currentRowStart !== topPostion) {
for (currentDiv = 0; currentDiv < rowDivs.length; currentDiv++) { for (currentDiv = 0; currentDiv < rowDivs.length; currentDiv++) {
rowDivs[currentDiv].height(currentTallest); rowDivs[currentDiv].height(currentTallest);
} }