Accessing Valibot schema params?
I have a schema:
Now want to do something like this:
Is it possible?
3 Replies
inland-turquoiseOP•9mo ago
I know I can do the following instead:
But having it in 1 object instead of 2 exports is much nicer...
equal-aqua•9mo ago
In Zod it should be
LoginSchema.shape.emailAddress
- so with Valibot you may try LoginSchema.entries.emailAddress
inland-turquoiseOP•9mo ago
Thanks for taking the time to answer. That was it. So much nicer!