Replies: 4 comments 3 replies
-
Hi @tjhoo, |
Beta Was this translation helpful? Give feedback.
-
@tjhoo @chanthinh Here is exactly what you need - https://substack.com/profile/200733325-runespoor-engineering/note/c-66073144 Just put zod schema inside the context over the Form and use this hook inside |
Beta Was this translation helpful? Give feedback.
-
With the power of Claude I found the solution: Updated
Usage:
If the schema is like this:
|
Beta Was this translation helpful? Give feedback.
-
If you use zod, you can Just check |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi
I have a component that wrap the shadcn ui form field with
react-hook-form
like this,Note that I have to add a
required
attribute in order to render the asterick when it is true.Is there a better way, for example to retrieve this
required
fromreact-hook-form
itself than adding arequired
atttribute?Beta Was this translation helpful? Give feedback.
All reactions