How to use schema validation with Typebox #7453
Replies: 2 comments 3 replies
-
you probably have to build a custom resolver: https://react-hook-form.com/api/useform and I am not familiar with this Typebox library as well. |
Beta Was this translation helpful? Give feedback.
-
For anyone stumbling across this, there is actually a react-hook-form resolver for TypeBox. Here it is mentioned in an official repo: However, I'm not satisfied with using TypeBox as a resolver, since I couldn't find any way to customize the error messages. This is important because the error messages are mostly very generic.
I'm honestly considering switching to something like Zod altogether. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I am planning to use Typebox on fastify to generate schemas and types for validation (https://github.com/sinclairzx81/typebox#readme)
But I have no idea how it can be integrated with hook form as well.
Example from typebox
Beta Was this translation helpful? Give feedback.
All reactions