Skip to content

How to add examples to @tanstack/zod-form-adapter? #978

Answered by Balastrong
vicentematus asked this question in Q&A
Discussion options

You must be logged in to vote

Do you think we need one more example for each adapter or would be enough to update the existing ones with form-level validation? That's probably the most common case anyway.

If you want to give it a try on the zod example I'm happy to have a look at your PR, the project source is on examples/react/zod

Speaking of the type, you can define the default values like that and you won't need to explicitly type the form

defaultValues: {
     email: "",
     companies: [],
   } as UserForm

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@vicentematus
Comment options

@vicentematus
Comment options

Answer selected by vicentematus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants