Skip to content

Conversation

@josephbuckley
Copy link

If multiple input fields are related in their values, then you may have a situation where updating one of the fields should force the other field to be validated. Prior to this change, if the field being re-validated has an async validator, the async validator's promise response will not be caught.

This adds a meta field to force the async validation to occur.

@stonebk
Copy link
Contributor

stonebk commented Apr 16, 2018

Couple thoughts:

  1. @kazooie and/or @jakepusateri can you add me as an owner of this project?
  2. Sounds like the async validator is always called, but if the result is a promise, then we do not wait for it to resolve if the value is unchanged. In the case the the value is unchanged, we still make the async request, so we aren't really saving network requests, just a little time. Should we just always wait for the resolve since we are already always making the request?
  3. Maybe we need a inputsConfig field called dependencies which takes an array of keys. If any of the dependencies change, then this one knows it can't skip validation.

@evocateur
Copy link
Contributor

can you add me as an owner of this project?

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants