react-validation icon indicating copy to clipboard operation
react-validation copied to clipboard

All server errors cleared when one of the inputs is changed

Open manikandasankar opened this issue 7 years ago • 1 comments

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), b4129f6e-e2cb-11e4-95bc-f272d95975c0

form with server errors and typing into the username would immediate make both errors disappear.

Any recommendations?

manikandasankar avatar Sep 18 '17 16:09 manikandasankar

_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.

handlebauer avatar Mar 23 '18 05:03 handlebauer