Mantine, Tanstack & Zod validation error display
When wrapping a Mantine input component in a Tanstack Field wrapper, is this the correct way to display an error message?
It works,, but I haven't found any documentation suggesting this route or gotten anything else to work with this trifecta. Thanks!

4 Replies
flat-fuchsiaOP•10mo ago
Basically if there is a Zod validation error in the field meta, it displays it and puts the field into an 'error' state with the associated red outline formatting.
dependent-tan•10mo ago
error={state.meta.errors[0]}
Why are you passing
form={form}
to the <Field />?flat-fuchsiaOP•10mo ago
ah thanks.
form is required by the FieldAPI

flat-fuchsiaOP•10mo ago
I hadn't considered why but I guess when used with Mantine, the Field object doesn't know which form it's associated with.