shadcn/ui: Why do I get the incorrect error message?
If I don't type anything in I only get the "required" message despite defining a message in the zod config.
Code: https://gist.github.com/FleetAdmiralJakob/d9654dc186ea1b96f3a6d9184fe6b95c
Gist
shadcn/ui error message
shadcn/ui error message. GitHub Gist: instantly share code, notes, and snippets.
Solution:Jump to solution
You didnβt provided default values for those fields so theyβre not defined if not filled in
3 Replies
Solution
You didnβt provided default values for those fields so theyβre not defined if not filled in
Theyβll be defined if you start typing but pretty sure RHF will also give you an error in the console asking you to properly register them ahead of time
ok, thank you very much
confirmed! worked