
Show HN: Zod – TypeScript-first validation library with static type inference - vriad
https://github.com/vriad/zod
======
vriad
Creator of Zod here. I wrote up a blog post comparing Zod to the other popular
object schema validation libraries (yup, io-ts, joi):
[https://vriad.com/blog/zod](https://vriad.com/blog/zod). I don't address the
various JSON-Schema validation libraries since none of them have static type
inference, which is (imho) the killer feature.

~~~
Shacklz
Looks really cool! We're currently using io-ts, and the one thing that bugs us
the most is it's less-than-optimal error-reporting. Especially for
complex/nested objects, the error messages produced are pretty much useless.
The functional aspect of it is something that we kind of got used to - and
mostly hide by having a few wrapper-functions.

Will look into it!

~~~
colinmcd
Just published an update to Zod that overhauls the error reporting. Now you
can get the exact location in your complex/nested object where each validation
error occurred. Plus all detected validation errors are reported
simultaneously instead of just throwing an error at the first sign of trouble.

If you decide to switch to Zod keep me posted and don't hesitate to reach out
with any feature ideas

