{"action":"created","issue":{"url":"https://api.github.com/repos/erikras/redux-form/issues/614","repository_url":"https://api.github.com/repos/erikras/redux-form","labels_url":"https://api.github.com/repos/erikras/redux-form/issues/614/labels{/name}","comments_url":"https://api.github.com/repos/erikras/redux-form/issues/614/comments","events_url":"https://api.github.com/repos/erikras/redux-form/issues/614/events","html_url":"https://github.com/erikras/redux-form/issues/614","id":130778359,"number":614,"title":"asyncValidate not called when field empty (even when field has been touched)","user":{"login":"tomduncalf","id":5458070,"avatar_url":"https://avatars.githubusercontent.com/u/5458070?v=3","gravatar_id":"","url":"https://api.github.com/users/tomduncalf","html_url":"https://github.com/tomduncalf","followers_url":"https://api.github.com/users/tomduncalf/followers","following_url":"https://api.github.com/users/tomduncalf/following{/other_user}","gists_url":"https://api.github.com/users/tomduncalf/gists{/gist_id}","starred_url":"https://api.github.com/users/tomduncalf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomduncalf/subscriptions","organizations_url":"https://api.github.com/users/tomduncalf/orgs","repos_url":"https://api.github.com/users/tomduncalf/repos","events_url":"https://api.github.com/users/tomduncalf/events{/privacy}","received_events_url":"https://api.github.com/users/tomduncalf/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-02T18:48:10Z","updated_at":"2016-02-03T07:44:06Z","closed_at":null,"body":"I'm not sure if this behaviour is by design or not, but I have found that if I have a form field which is async validated, the validation function is not called when the field is empty - even if it has previously been touched/edited. This means that I can't perform \"required string\" validation async, as far as I can tell.\r\n\r\nSteps to reproduce:\r\n1. Create a redux-form with one field, with an `asyncValidate` function and the field in `asyncFields`\r\n2. Enter some text in the field and blur it - the validation function will be called\r\n3. Clear the text in the field and blur it - the validation function will not be called\r\n\r\nI would expect the function to be called in 3 as I have previously touched the field, and I might for example want to check if a required value is present.\r\n\r\nA tiny bit of debugging shows that at 3, `allPristine` in https://github.com/erikras/redux-form/blob/a53f22b816d72dca726d7a220b0e1428dbe522f8/src/createHigherOrderComponent.js#L72 is `true` - perhaps I've misunderstood what pristine refers to in this context, but I think perhaps `allPristine` should be false, as this field has been touched.\r\n\r\nAny thoughts? At the minute this prevents me from using async validation for the form I am working on (trying to use https://github.com/jquense/yup to validate against a schema, but it only works with callbacks/promises, not synchronously)\r\n\r\nThanks!\r\nTom"},"comment":{"url":"https://api.github.com/repos/erikras/redux-form/issues/comments/179070986","html_url":"https://github.com/erikras/redux-form/issues/614#issuecomment-179070986","issue_url":"https://api.github.com/repos/erikras/redux-form/issues/614","id":179070986,"user":{"login":"tomduncalf","id":5458070,"avatar_url":"https://avatars.githubusercontent.com/u/5458070?v=3","gravatar_id":"","url":"https://api.github.com/users/tomduncalf","html_url":"https://github.com/tomduncalf","followers_url":"https://api.github.com/users/tomduncalf/followers","following_url":"https://api.github.com/users/tomduncalf/following{/other_user}","gists_url":"https://api.github.com/users/tomduncalf/gists{/gist_id}","starred_url":"https://api.github.com/users/tomduncalf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomduncalf/subscriptions","organizations_url":"https://api.github.com/users/tomduncalf/orgs","repos_url":"https://api.github.com/users/tomduncalf/repos","events_url":"https://api.github.com/users/tomduncalf/events{/privacy}","received_events_url":"https://api.github.com/users/tomduncalf/received_events","type":"User","site_admin":false},"created_at":"2016-02-03T07:44:06Z","updated_at":"2016-02-03T07:44:06Z","body":"Ah yes, rolling back to `4.1.5` fixes the issue for now :+1: Cheers!"}}