{"action":"created","issue":{"url":"https://api.github.com/repos/erikras/redux-form/issues/75","labels_url":"https://api.github.com/repos/erikras/redux-form/issues/75/labels{/name}","comments_url":"https://api.github.com/repos/erikras/redux-form/issues/75/comments","events_url":"https://api.github.com/repos/erikras/redux-form/issues/75/events","html_url":"https://github.com/erikras/redux-form/issues/75","id":107147983,"number":75,"title":"Async validation requires a 'valid' attribute?","user":{"login":"yoo2001818","id":4210268,"avatar_url":"https://avatars.githubusercontent.com/u/4210268?v=3","gravatar_id":"","url":"https://api.github.com/users/yoo2001818","html_url":"https://github.com/yoo2001818","followers_url":"https://api.github.com/users/yoo2001818/followers","following_url":"https://api.github.com/users/yoo2001818/following{/other_user}","gists_url":"https://api.github.com/users/yoo2001818/gists{/gist_id}","starred_url":"https://api.github.com/users/yoo2001818/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yoo2001818/subscriptions","organizations_url":"https://api.github.com/users/yoo2001818/orgs","repos_url":"https://api.github.com/users/yoo2001818/repos","events_url":"https://api.github.com/users/yoo2001818/events{/privacy}","received_events_url":"https://api.github.com/users/yoo2001818/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-18T07:23:18Z","updated_at":"2015-09-18T08:16:39Z","closed_at":"2015-09-18T08:10:19Z","body":"I was trying to use async validation, but I'm not able to submit the form due to unknown reason.\r\n\r\nIt turns out that returning an empty object isn't accepted as a valid form.\r\n```js\r\nfunction validateContactAsync(data, dispatch) {\r\n  // This doesn't validate the form!\r\n  return Promise.resolve({});\r\n}\r\n```\r\n\r\nI looked at the redux-form's code and found that isAsyncValid() function only looks at the 'valid' attribute of returned object, unlike isValid() function.\r\nWhich means, this works:\r\n```js\r\nfunction validateContactAsync(data, dispatch) {\r\n  // This does validate the form.\r\n  return Promise.resolve({valid: true});\r\n}\r\n```\r\n\r\nIs this an expected behavior? I think sync / async form validation acting differently is wrong."},"comment":{"url":"https://api.github.com/repos/erikras/redux-form/issues/comments/141378194","html_url":"https://github.com/erikras/redux-form/issues/75#issuecomment-141378194","issue_url":"https://api.github.com/repos/erikras/redux-form/issues/75","id":141378194,"user":{"login":"erikras","id":4396759,"avatar_url":"https://avatars.githubusercontent.com/u/4396759?v=3","gravatar_id":"","url":"https://api.github.com/users/erikras","html_url":"https://github.com/erikras","followers_url":"https://api.github.com/users/erikras/followers","following_url":"https://api.github.com/users/erikras/following{/other_user}","gists_url":"https://api.github.com/users/erikras/gists{/gist_id}","starred_url":"https://api.github.com/users/erikras/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erikras/subscriptions","organizations_url":"https://api.github.com/users/erikras/orgs","repos_url":"https://api.github.com/users/erikras/repos","events_url":"https://api.github.com/users/erikras/events{/privacy}","received_events_url":"https://api.github.com/users/erikras/received_events","type":"User","site_admin":false},"created_at":"2015-09-18T08:16:39Z","updated_at":"2015-09-18T08:16:39Z","body":"Thanks for this. It was a legit bug, and also some wrong-headed thinking on my part. All the validation methods used to allow a `valid` flag to short-circuit the looping of the errors (#21), but the data structure has changed since then, and that was a vestigial remnant."}}