Skip to content

Commit ac9adda

Browse files
authored
Update jquery-validation-unobtrusive (#421)
Addresses #15
1 parent 2f9ce95 commit ac9adda

29 files changed

+3266
-2153
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,15 @@
11
{
22
"name": "jquery-validation-unobtrusive",
3-
"version": "3.2.6",
43
"homepage": "https://github.com/aspnet/jquery-validation-unobtrusive",
5-
"description": "Add-on to jQuery Validation to enable unobtrusive validation options in data-* attributes.",
6-
"main": [
7-
"jquery.validate.unobtrusive.js"
8-
],
9-
"ignore": [
10-
"**/.*",
11-
"*.json",
12-
"*.md",
13-
"*.txt",
14-
"gulpfile.js"
15-
],
16-
"keywords": [
17-
"jquery",
18-
"asp.net",
19-
"mvc",
20-
"validation",
21-
"unobtrusive"
22-
],
23-
"authors": [
24-
"Microsoft"
25-
],
26-
"license": "http://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm",
27-
"repository": {
28-
"type": "git",
29-
"url": "git://github.com/aspnet/jquery-validation-unobtrusive.git"
30-
},
31-
"dependencies": {
32-
"jquery-validation": ">=1.8",
33-
"jquery": ">=1.8"
34-
},
35-
"_release": "3.2.6",
4+
"version": "3.2.9",
5+
"_release": "3.2.9",
366
"_resolution": {
377
"type": "version",
38-
"tag": "v3.2.6",
39-
"commit": "13386cd1b5947d8a5d23a12b531ce3960be1eba7"
8+
"tag": "v3.2.9",
9+
"commit": "a91f5401898e125f10771c5f5f0909d8c4c82396"
4010
},
41-
"_source": "git://github.com/aspnet/jquery-validation-unobtrusive.git",
42-
"_target": "3.2.6",
43-
"_originalSource": "jquery-validation-unobtrusive"
11+
"_source": "https://github.com/aspnet/jquery-validation-unobtrusive.git",
12+
"_target": "^3.2.9",
13+
"_originalSource": "jquery-validation-unobtrusive",
14+
"_direct": true
4415
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Copyright (c) .NET Foundation. All rights reserved.
2+
3+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4+
these files except in compliance with the License. You may obtain a copy of the
5+
License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software distributed
10+
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11+
CONDITIONS OF ANY KIND, either express or implied. See the License for the
12+
specific language governing permissions and limitations under the License.

src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorPagesWeb-CSharp/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,22 @@
1-
/*!
2-
** Unobtrusive validation support library for jQuery and jQuery Validate
3-
** Copyright (C) Microsoft Corporation. All rights reserved.
4-
*/
1+
// Unobtrusive validation support library for jQuery and jQuery Validate
2+
// Copyright (C) Microsoft Corporation. All rights reserved.
3+
// @version v3.2.9
54

65
/*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 */
76
/*global document: false, jQuery: false */
87

9-
(function ($) {
8+
(function (factory) {
9+
if (typeof define === 'function' && define.amd) {
10+
// AMD. Register as an anonymous module.
11+
define("jquery.validate.unobtrusive", ['jquery.validation'], factory);
12+
} else if (typeof module === 'object' && module.exports) {
13+
// CommonJS-like environments that support module.exports
14+
module.exports = factory(require('jquery-validation'));
15+
} else {
16+
// Browser global
17+
jQuery.validator.unobtrusive = factory(jQuery);
18+
}
19+
}(function ($) {
1020
var $jQval = $.validator,
1121
adapters,
1222
data_validation = "unobtrusiveValidation";
@@ -118,7 +128,7 @@
118128
execInContext = function (name, args) {
119129
var func = defaultOptions[name];
120130
func && $.isFunction(func) && func.apply(form, args);
121-
}
131+
};
122132

123133
if (!result) {
124134
result = {
@@ -409,8 +419,13 @@
409419
setValidationValues(options, "regex", options.params.regex);
410420
}
411421
});
422+
adapters.add("fileextensions", ["extensions"], function (options) {
423+
setValidationValues(options, "extension", options.params.extensions);
424+
});
412425

413426
$(function () {
414427
$jQval.unobtrusive.parse(document);
415428
});
416-
}(jQuery));
429+
430+
return $jQval.unobtrusive;
431+
}));

src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorPagesWeb-CSharp/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js

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

src/Microsoft.DotNet.Web.ProjectTemplates/content/RazorPagesWeb-CSharp/wwwroot/lib/jquery-validation/.bower.json

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"name": "jquery-validation",
3-
"homepage": "http://jqueryvalidation.org/",
3+
"homepage": "https://jqueryvalidation.org/",
44
"repository": {
55
"type": "git",
6-
"url": "git://github.com/jzaefferer/jquery-validation.git"
6+
"url": "git://github.com/jquery-validation/jquery-validation.git"
77
},
88
"authors": [
99
"Jörn Zaefferer <[email protected]>"
@@ -27,14 +27,15 @@
2727
"dependencies": {
2828
"jquery": ">= 1.7.2"
2929
},
30-
"version": "1.14.0",
31-
"_release": "1.14.0",
30+
"version": "1.17.0",
31+
"_release": "1.17.0",
3232
"_resolution": {
3333
"type": "version",
34-
"tag": "1.14.0",
35-
"commit": "c1343fb9823392aa9acbe1c3ffd337b8c92fed48"
34+
"tag": "1.17.0",
35+
"commit": "fc9b12d3bfaa2d0c04605855b896edb2934c0772"
3636
},
37-
"_source": "git://github.com/jzaefferer/jquery-validation.git",
38-
"_target": ">=1.8",
39-
"_originalSource": "jquery-validation"
37+
"_source": "https://github.com/jzaefferer/jquery-validation.git",
38+
"_target": "^1.17.0",
39+
"_originalSource": "jquery-validation",
40+
"_direct": true
4041
}

0 commit comments

Comments
 (0)