Is there a way to persist form level errors after the form has been interacted with? #1629
Unanswered
NickCoombe1
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I've got a use case where a user enters information in a form and clicks submit. The onSubmit validators at the form level complain that one or more fields are invalid. However once the user goes in and starts to fix the first error, all the errors are wiped from the errorMap.
I'd like to ideally display all the errors at the top of the form similar to this. Then either remove each error as its been solved or the whole form is revalidated. I've managed to work around this by using the fieldMeta to access the errors but that requires me to iterate over the entire form.fieldMeta to get the errors I'd like to display.
I've got a working example here.
Steps to reproduce:
It would be good to understand if this is something that I'm doing wrong and Tanstack Form doesn't want to support or perhaps is on the roadmap in the future.
It feels related to this issue too.
Beta Was this translation helpful? Give feedback.
All reactions