Support for form-level error #7296
phuctm97
started this conversation in
Feature requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently, Mantine Form only supports field-level errors, it would be great to support form-level error as well since Mantine is already wrapping
onSubmit
, Mantine can easily catch submit errors and set to a form-level error. Currently, I need to try catch in every onSubmit and set form-level error myself, which works but feels unintuitive.Furthermore, Mantine Form can support server/submission-level error handling by having an option in
useForm
, something liketranformError
, which will take the error thrown duringonSubmit
and return Mantine Form errors (field errors and form-level errors).Beta Was this translation helpful? Give feedback.
All reactions