Skip to content

Releases: colinhacks/zod

v1.8

09 Jul 03:27

Choose a tag to compare

  • Major overhaul to error handling system, including the introduction of custom error maps.
  • Introduced z.void()
  • Wrote new error handling guide.

1.7

08 Jun 23:46

Choose a tag to compare

1.7

Added several built-in validators to string, number, and array schemas. Calls to .refine now return new instance.

v1.0

29 Mar 03:52

Choose a tag to compare

After working out some initial kinks (#20, #24), fixing some compatibility issues with previous versions of TypeScript (#25), and implementing some of the most glaring feature holes (#2, #5, #8, #17), Zod is ready for a proper v1 release 🚀

Thanks to everyone for submitting issues and PRs! Keep em coming.

v1.2.0

06 Apr 05:01

Choose a tag to compare

Major improvement to object schemas.

Implemented .pick, .omit, and .augment. Documented in README.

v1.1.2

04 Apr 19:47

Choose a tag to compare

Implemented ZodRecord.

Usage:

const myRecord = z.record(z.object({ name: z.string() }));
type myRecord = z.TypeOf<typeof myRecord>
// => { [k: string]: { name: string } }

myRecord.parse({ 
  asdf: { name: 'Bruce' },
  1234: { name: 'Barry' },
}) // passes

myRecord.parse({ 
  id1: true
}) // TypeError

myRecord.parse({ 
  id1: true
} as any) // throws