Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Changed lastElement to lastActive in keyup, skip validation on tab or…

… empty element. Fixes #244
  • Loading branch information...
commit c41f2f616d4b774859b7abf88f318ae409bff2f2 1 parent 43d963b
@mlynch mlynch authored committed
Showing with 3 additions and 1 deletion.
  1. +3 −1 jquery.validate.js
View
4 jquery.validate.js
@@ -234,7 +234,9 @@ $.extend($.validator, {
}
},
onkeyup: function(element, event) {
- if ( element.name in this.submitted || element === this.lastElement ) {
+ if ( event.which == 9 && this.elementValue(element) === '' ) {
@staabm Collaborator
staabm added a note

@jzaefferer is there a config switch or something like that to enable validation when user jumps between fields with TAB? ATM the required fields are only checked on validate().form() call, not while typing...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ return;
+ } else if ( element.name in this.submitted || element === this.lastActive ) {
this.element(element);
}
},

1 comment on commit c41f2f6

@STRUDSO

As fare as i can see then the lastElement is not in use anymore, then why not get ride of it, or am i missing something?

Please sign in to comment.
Something went wrong with that request. Please try again.