react-validation
react-validation copied to clipboard
All server errors cleared when one of the inputs is changed
When I have server errors returned (and set via showError callback), the form correctly shows all the errors next to their fields. However, as soon as I type into one of the inputs all the errors disappear.
For example (just a test form I'm using),
form with server errors and typing into the username would immediate make both errors disappear.
Any recommendations?
_setErrors
is the culprit — it's called at the tail end of _handleChange
et al., and (from what I can tell) _setErrors
just does a blind sweep through ALL of the form components and clears errors if they don't fail any of the validations.
I'd love to see this changed so that _setErrors
only targets the active control.