{"action":"created","issue":{"url":"https://api.github.com/repos/erikras/redux-form/issues/164","labels_url":"https://api.github.com/repos/erikras/redux-form/issues/164/labels{/name}","comments_url":"https://api.github.com/repos/erikras/redux-form/issues/164/comments","events_url":"https://api.github.com/repos/erikras/redux-form/issues/164/events","html_url":"https://github.com/erikras/redux-form/pull/164","id":113145282,"number":164,"title":"fixed not submitting if there are no async errors","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":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-24T08:18:55Z","updated_at":"2015-10-24T08:20:11Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/erikras/redux-form/pulls/164","html_url":"https://github.com/erikras/redux-form/pull/164","diff_url":"https://github.com/erikras/redux-form/pull/164.diff","patch_url":"https://github.com/erikras/redux-form/pull/164.patch"},"body":"Currently `handleSubmit` routine checks whether if there are async errors by doing this:\r\n```js\r\nreturn this.runAsyncValidation(actions, values).then(asyncValid => {\r\n  if (allValid && asyncValid) {\r\n    ...\r\n  }\r\n}\r\n```\r\n\r\nBut `runAsyncValidation` function returns true **if there are errors**:\r\n```js\r\nreturn hasErrors(asyncErrors);\r\n```\r\n\r\nSince this function returns true if there are errors, form can be only submitted if there are async errors in the form.\r\n\r\nThis pull request fixes this issue by changing `runAsyncValidation` to return an object of errors (thus acting same as `runSyncValidation` to give consistency).\r\n\r\n```js\r\nreturn this.runAsyncValidation(actions, values).then(asyncErrors => {\r\n  if (allValid && !hasErrors(asyncErrors)) {\r\n    ...\r\n  }\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/erikras/redux-form/issues/comments/150775054","html_url":"https://github.com/erikras/redux-form/pull/164#issuecomment-150775054","issue_url":"https://api.github.com/repos/erikras/redux-form/issues/164","id":150775054,"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},"created_at":"2015-10-24T08:20:11Z","updated_at":"2015-10-24T08:20:11Z","body":"Seems like this is related to #161."}}