Skip to content

Commit c41f2f6

Browse files
mlynchjzaefferer
authored andcommitted
Changed lastElement to lastActive in keyup, skip validation on tab or empty element. Fixes jquery-validation#244
1 parent 43d963b commit c41f2f6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

jquery.validate.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,9 @@ $.extend($.validator, {
234234
}
235235
},
236236
onkeyup: function(element, event) {
237-
if ( element.name in this.submitted || element === this.lastElement ) {
237+
if ( event.which == 9 && this.elementValue(element) === '' ) {
238+
return;
239+
} else if ( element.name in this.submitted || element === this.lastActive ) {
238240
this.element(element);
239241
}
240242
},

0 commit comments

Comments
 (0)