[Feature request] Global/root form error, independent of form fields #716
Unanswered
bennettdams
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey!
I think it would be nice to have a global/root form error that you can show next to the form.
Imagine a user submits its form, (client) validation is successful, request is sent to the backend. But something goes wrong (network, business logic, etc.), so we'll e.g. get a 400 response.
For such, I want to show a message next to the form.
You could obviously do this yourself, but then you also have to keep track of the form's submissions, as the error may goes away after the next submit. So integrating it as part of the form would be nice.
The easiest solution in my head is to have a new reserved field on the
FormApi
, something likerootError
. One should have the possibility to get and set the value and it should be reset on a submission.If I understand correctly, some API-related changes will soon allow to set field errors from the
onSubmit
callback. But this feature request is something different.Beta Was this translation helpful? Give feedback.
All reactions