Skip to content
Discussion options

You must be logged in to vote

Thank you for your suggestion.

I have checked whether the proposed function can be implemented at present. To conclude, it will be difficult to implement immediately. Also, how about using the following as an alternative?

const schema = z.object({
  username: z.string().describe("Your unique identifier"),
  password: z.string().describe("At least 8 characters long"),
});

console.log(schema.shape.username.description);

First of all, Conform, i.e. useForm, does not access Schema. Therefore, to implement this proposal, a new process is required to obtain the description data of the Schema passed from APIs such as useForm. Furthermore, not only Zod but also Valibot can define descriptions, s…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@nikolailehbrink
Comment options

Answer selected by nikolailehbrink
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