Skip to content

Zod validation on forms vs fields #1586

Discussion options

You must be logged in to vote

Standard schema issues are objects with a message property, but your field validator returns a string for the error. Your error may resolve to undefined (<string>.message) and won't be rendered. Could you double check the typing?

Field validator errors (should) take precedence over form validator errors, and I'm able to recreate it on a stackblitz example.
https://stackblitz.com/edit/tanstack-form-jff7pyyu?file=src%2Findex.tsx

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@iSpeakNerd
Comment options

Answer selected by iSpeakNerd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants