{"action":"created","issue":{"url":"https://api.github.com/repos/Knockout-Contrib/Knockout-Validation/issues/549","labels_url":"https://api.github.com/repos/Knockout-Contrib/Knockout-Validation/issues/549/labels{/name}","comments_url":"https://api.github.com/repos/Knockout-Contrib/Knockout-Validation/issues/549/comments","events_url":"https://api.github.com/repos/Knockout-Contrib/Knockout-Validation/issues/549/events","html_url":"https://github.com/Knockout-Contrib/Knockout-Validation/issues/549","id":59624763,"number":549,"title":"Async result still applied even when condition changed to false","user":{"login":"lostincomputer","id":5906698,"avatar_url":"https://avatars.githubusercontent.com/u/5906698?v=3","gravatar_id":"","url":"https://api.github.com/users/lostincomputer","html_url":"https://github.com/lostincomputer","followers_url":"https://api.github.com/users/lostincomputer/followers","following_url":"https://api.github.com/users/lostincomputer/following{/other_user}","gists_url":"https://api.github.com/users/lostincomputer/gists{/gist_id}","starred_url":"https://api.github.com/users/lostincomputer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lostincomputer/subscriptions","organizations_url":"https://api.github.com/users/lostincomputer/orgs","repos_url":"https://api.github.com/users/lostincomputer/repos","events_url":"https://api.github.com/users/lostincomputer/events{/privacy}","received_events_url":"https://api.github.com/users/lostincomputer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-03-03T10:49:30Z","updated_at":"2015-03-04T19:01:56Z","closed_at":null,"body":"The result of async rule is still being applied even when the condition has changed to false. This causes Knockout Validation to mark the observable as invalid even when it should be valid.\r\n\r\nTimeline:\r\n1. Observable is set to an invalid value.\r\n2. Rule's condition is set to true.\r\n3. Knockout Validation runs the async rule.\r\n4. Rule's condition is changed to false\r\n6. Async rule finishes and calls callback(false)\r\n7. observables.isValid is false when it should be true!\r\n\r\nSame problem occurs if the observable's value changes before the async rule finishes."},"comment":{"url":"https://api.github.com/repos/Knockout-Contrib/Knockout-Validation/issues/comments/77222282","html_url":"https://github.com/Knockout-Contrib/Knockout-Validation/issues/549#issuecomment-77222282","issue_url":"https://api.github.com/repos/Knockout-Contrib/Knockout-Validation/issues/549","id":77222282,"user":{"login":"ncortines","id":7069922,"avatar_url":"https://avatars.githubusercontent.com/u/7069922?v=3","gravatar_id":"","url":"https://api.github.com/users/ncortines","html_url":"https://github.com/ncortines","followers_url":"https://api.github.com/users/ncortines/followers","following_url":"https://api.github.com/users/ncortines/following{/other_user}","gists_url":"https://api.github.com/users/ncortines/gists{/gist_id}","starred_url":"https://api.github.com/users/ncortines/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ncortines/subscriptions","organizations_url":"https://api.github.com/users/ncortines/orgs","repos_url":"https://api.github.com/users/ncortines/repos","events_url":"https://api.github.com/users/ncortines/events{/privacy}","received_events_url":"https://api.github.com/users/ncortines/received_events","type":"User","site_admin":false},"created_at":"2015-03-04T19:01:55Z","updated_at":"2015-03-04T19:01:55Z","body":"@crissdev , thanks for the example, it is a goof workaround.\r\n\r\nHowever I have to agree with @lostincomputer . The current behavior does not seem to be correct."}}