{"action":"created","issue":{"url":"https://api.github.com/repos/jzaefferer/jquery-validation/issues/1579","labels_url":"https://api.github.com/repos/jzaefferer/jquery-validation/issues/1579/labels{/name}","comments_url":"https://api.github.com/repos/jzaefferer/jquery-validation/issues/1579/comments","events_url":"https://api.github.com/repos/jzaefferer/jquery-validation/issues/1579/events","html_url":"https://github.com/jzaefferer/jquery-validation/pull/1579","id":106404505,"number":1579,"title":"Fixes #1508: Validation fails to trigger when next field is already filled out","user":{"login":"Arkni","id":6888059,"avatar_url":"https://avatars.githubusercontent.com/u/6888059?v=3","gravatar_id":"","url":"https://api.github.com/users/Arkni","html_url":"https://github.com/Arkni","followers_url":"https://api.github.com/users/Arkni/followers","following_url":"https://api.github.com/users/Arkni/following{/other_user}","gists_url":"https://api.github.com/users/Arkni/gists{/gist_id}","starred_url":"https://api.github.com/users/Arkni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Arkni/subscriptions","organizations_url":"https://api.github.com/users/Arkni/orgs","repos_url":"https://api.github.com/users/Arkni/repos","events_url":"https://api.github.com/users/Arkni/events{/privacy}","received_events_url":"https://api.github.com/users/Arkni/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-09-14T18:48:19Z","updated_at":"2015-09-18T23:02:35Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/jzaefferer/jquery-validation/pulls/1579","html_url":"https://github.com/jzaefferer/jquery-validation/pull/1579","diff_url":"https://github.com/jzaefferer/jquery-validation/pull/1579.diff","patch_url":"https://github.com/jzaefferer/jquery-validation/pull/1579.patch"},"body":"See #1508 for more information.\r\n\r\nThis pull request removes also the need for `lastElement`"},"comment":{"url":"https://api.github.com/repos/jzaefferer/jquery-validation/issues/comments/141589781","html_url":"https://github.com/jzaefferer/jquery-validation/pull/1579#issuecomment-141589781","issue_url":"https://api.github.com/repos/jzaefferer/jquery-validation/issues/1579","id":141589781,"user":{"login":"Arkni","id":6888059,"avatar_url":"https://avatars.githubusercontent.com/u/6888059?v=3","gravatar_id":"","url":"https://api.github.com/users/Arkni","html_url":"https://github.com/Arkni","followers_url":"https://api.github.com/users/Arkni/followers","following_url":"https://api.github.com/users/Arkni/following{/other_user}","gists_url":"https://api.github.com/users/Arkni/gists{/gist_id}","starred_url":"https://api.github.com/users/Arkni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Arkni/subscriptions","organizations_url":"https://api.github.com/users/Arkni/orgs","repos_url":"https://api.github.com/users/Arkni/repos","events_url":"https://api.github.com/users/Arkni/events{/privacy}","received_events_url":"https://api.github.com/users/Arkni/received_events","type":"User","site_admin":false},"created_at":"2015-09-18T23:02:35Z","updated_at":"2015-09-18T23:02:35Z","body":"@staabm \r\nYes, I did.\r\n\r\nHere it is:\r\n```js\r\ntest( \"#1508: Validation fails to trigger when next field is already filled out\", function() {\r\n\t// The next field is already filled out.\r\n\t$( \"#lastname\" ).val( \"something\" );\r\n\r\n\tvar event     = $.Event( \"keyup\", { keyCode: 9 } ),\r\n\t\telement   = $( \"#firstname\" ),\r\n\t\tvalidator = $( \"#testForm1\" ).validate();\r\n\r\n\t// Fill the first element\r\n\telement.val( \"abc\" );\r\n\r\n\t// Tab to the next field\r\n\telement.blur();\r\n\t$(\"#lastname\").trigger( event );\r\n\t$(\"#lastname\").focus();\r\n\r\n\t// Tab back to element\r\n\t$(\"#lastname\").blur();\r\n\telement.trigger( event );\r\n\telement.focus();\r\n\r\n\t// Delete the content\r\n\telement.val( \"\" );\r\n\telement.trigger( \"keyup\" );\r\n\r\n\t// element should be invalid\r\n\tequal( 1, validator.numberOfInvalids(), \"The element is not valid\" );\r\n});\r\n```\r\n\r\nAnd it fails as expected without my patch.\r\n\r\n```\r\nRunning \"qunit:files\" (qunit) task\r\nTesting test/index.html ............................................................................F....................................................................................................................................\r\n>> events - #1508: Validation fails to trigger when next field is already filled out\r\n>> Message: The element is not valid\r\n>> Actual: 1\r\n>> Expected: 0\r\n>> at file:///home/arkni/Git%20Repositories/jquery-validation/test/qunit/qunit.js:1311\r\n>>   at file:///home/arkni/Git%20Repositories/jquery-validation/test/qunit/qunit.js:1907\r\n>>   at file:///home/arkni/Git%20Repositories/jquery-validation/test/test.js:1363\r\n>>   at file:///home/arkni/Git%20Repositories/jquery-validation/test/qunit/qunit.js:895\r\n>>   at file:///home/arkni/Git%20Repositories/jquery-validation/test/qunit/qunit.js:1024\r\n>>   at process (file:///home/arkni/Git%20Repositories/jquery-validation/test/qunit/qunit.js:583)\r\n>>   at begin (file:///home/arkni/Git%20Repositories/jquery-validation/test/qunit/qunit.js:628)\r\n>>   at file:///home/arkni/Git%20Repositories/jquery-validation/test/qunit/qunit.js:644\r\n\r\nWarning: 1/1220 assertions failed (5338ms) Use --force to continue.\r\n```\r\n\r\nIs this the right way to test it ?"}}