Skip to content

Commit

Permalink
fixed bug in dynamic validation
Browse files Browse the repository at this point in the history
  • Loading branch information
frankabbruzzese committed Nov 1, 2016
1 parent e539fbb commit e0a427a
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jquery-validation-unobtrusive-extensions",
"version": "1.0.1",
"version": "1.0.2",
"homepage": "https://github.com/MvcControlsToolkit/Unobtrusive.Extensions",
"description": "Add-on to jQuery Unobtrusive Validation to enable globalization and dynamic content parsing",
"main": [
Expand Down
5 changes: 3 additions & 2 deletions jquery.validate.unobtrusive.dynamic.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,10 @@

$.validator.unobtrusive.parseDynamic = function (selector) {
var form = $(selector).first().closest('form');
if (form.length == 0) return;
if (!form.length && !$(selector).find('form').length) return;
$.validator.unobtrusive.parse(selector);
registerFormFix(selector, form);
if (form.length)
registerFormFix(selector, form);
}
$.validator.unobtrusive.parseElementDynamic = function (selector) {
var form = $(selector).first().closest('form');
Expand Down
2 changes: 1 addition & 1 deletion jquery.validate.unobtrusive.dynamic.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion jquery.validate.unobtrusive.extensions.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jquery-validation-unobtrusive-extensions",
"version": "1.0.1",
"version": "1.0.2",
"homepage": "https://github.com/aspnet/jquery-validation-unobtrusive",
"description": "Add-on to jQuery Unobtrusive Validation to enable globalization and dynamic content parsing.",
"main": "jquery.validate.unobtrusive.globalize.min.js",
Expand Down

0 comments on commit e0a427a

Please sign in to comment.