colinhacks / tozod

MIT License
153 stars 7 forks source link

Update with nullable, optional, defaults, and disallowed keys #28

Open rhinodavid opened 1 year ago

rhinodavid commented 1 year ago

Colin -- here's a quick-and-dirty update of you toZod package.

I would love to see a mature version of this get upstreamed into zod.

-d

karlhorky commented 1 year ago

This would be great if this could be upstreamed as a first-class part of Zod! One last big thing that is missing vs Yup.

It would also close this feature request here:

cc @JacobWeisenburger @rphlmr @colinhacks

karlhorky commented 1 year ago

Some feedback that the community wants this over on Twitter:

Alex / KATT: I often build @zodtypes schemas based on interfaces from libraries etc - is there a nice utility for that?

I spent a few minutes doing this but I think the error messages could be more contextual

Source: https://twitter.com/alexdotjs/status/1658409815536812032

hungify2022 commented 1 year ago

@rhinodavid It saves my day Thanks a lot :heart: