Strict object validation is handy for data exploration
Published on in JavaScript, TypeScript and Zod
Alternative title:
I finally found a good use case for z.object().strict()
in Zod.
Published on in JavaScript, TypeScript and Zod
Alternative title:
I finally found a good use case for z.object().strict()
in Zod.
Date
objects are nicer to work with than date stringsPublished on in JavaScript, TypeScript and Zod
When parsing data,
date strings should likely be converted to Date
objects.
But beware mutations.
Published on in JavaScript, Joi, TypeScript and Zod
Last updated on
Parsing encompasses validation, plus it can increase type-safety, plus it can transform the data to a better format. Parse, don't just validate.