react-redux-form
react-redux-form copied to clipboard
Is there a way to inform the user about connection error happening during asynchronous validation?
Validator callbacks can only return true or false and they don't receive dispatch, so should I write my own validation in this case (onBlur, on Submit handlers, dispatching setValidity actions myself etc)? Or should I pass dispatch to validator callback myself? To do this, I must call connect() on a component that uses Form, then make validator a method of that component, then bind it so it can access this.props.dispatch, which I don't like since it introduces parts of validation logic in component that shouldn't know about it.
If this is a common enough case, maybe that callback should receive dispatch or be able to return value other than true or false in the future?