Closed JheanAntunes closed 10 months ago
AutoForm uses shadcn's FormMessage
component which should automatically show the error messages that zod throws.
If you want to manually add messages, you can use values
and onValuesChange
(https://github.com/vantezzen/auto-form/tree/main#controlled-form) to get the current values, pass them through zod yourself and use the renderParent
(https://github.com/vantezzen/auto-form/tree/main#custom-parent-component) config to add error message elements next to the inputs.
Thank you, friend, for solving my question.
I wanted to display the errors of the messages that I put in the validation in the schema, does anyone know how to do it ?