Skip to content

Commit 3a42224

Browse files
committed
Don't use form.elements as that isn't supported in jQuery 1.6 anymore.
ITs buggy as hell anyway (IE6-8: form.elements === form).
1 parent bb4a84a commit 3a42224

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

jquery.validate.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -430,9 +430,8 @@ $.extend($.validator, {
430430
rulesCache = {};
431431

432432
// select all valid inputs inside the form (no submit or reset buttons)
433-
// workaround $Query([]).add until http://dev.jquery.com/ticket/2114 is solved
434-
return $([]).add(this.currentForm.elements)
435-
.filter(":input")
433+
return $(this.currentForm)
434+
.find("input, select, textarea")
436435
.not(":submit, :reset, :image, [disabled]")
437436
.not( this.settings.ignore )
438437
.filter(function() {

0 commit comments

Comments
 (0)