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β€’8mo ago
You didn’t provided default values for those fields so they’re not defined if not filled in
janglad
jangladβ€’8mo 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
Want results from more Discord servers?
Add your server