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.
No description
No description
Solution:
You didnโ€™t provided default values for those fields so theyโ€™re not defined if not filled in
Jump to solution
3 Replies
Solution
janglad
jangladโ€ข2mo ago
You didnโ€™t provided default values for those fields so theyโ€™re not defined if not filled in
janglad
jangladโ€ข2mo ago
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
FleetAdmiralJakob ๐Ÿ—• ๐Ÿ—— ๐Ÿ—™
ok, thank you very much confirmed! worked