I am using redux-form v6.0.1
.
Right now, my use-case involves creating a form where:
- Errors are only displayed
onSubmit
, whensubmitFailed
prop istrue
. - When the user goes back to fix the errors, the errors go away, and don't redisplay until the next time
onSubmit
is called.
My current solution involves setting touchOnBlur: false
, and having my error message display when touched && error
. redux-form
touches every field when onSubmit
is triggered, so I add logic to every field to set touched = false
when the user revisits, to hide the error until the next form submission. However, this seems very counter-intuitive (setting touched
to false when the user touches things). Is there a more natural way to accomplish this?