diff --git a/jquery.validate.js b/jquery.validate.js index c86bf6abe..d94cd25ff 100644 --- a/jquery.validate.js +++ b/jquery.validate.js @@ -480,6 +480,11 @@ $.extend($.validator, { console.error( "%o has no name assigned", this); } + // ignore elements of nested forms + if ( this.form !== validator.currentForm ) { + return false; + } + // select only the first element for each name, and only those with rules specified if ( this.name in rulesCache || !validator.objectLength($(this).rules()) ) { return false; diff --git a/test/index.html b/test/index.html index bb9fc4ad8..52ceecf6e 100644 --- a/test/index.html +++ b/test/index.html @@ -318,6 +318,10 @@
+ +