zod 3.20.3
Features
- Add string cuid2() validation by @joulev in https://github.com/colinhacks/zod/pull/1813
- Add
ZodNumber.isFinite, makeZodNumber.isInttrue if.multipleOf(int). by @igalklebanov in https://github.com/colinhacks/zod/pull/1714 - feat: Add
extract/excludemethods toZodEnumby @santosmarco-caribou in https://github.com/colinhacks/zod/pull/1652
Fixes and documentation
- add more test cases for
z.coerce. by @igalklebanov in https://github.com/colinhacks/zod/pull/1680 - Add Modular Forms to form integrations in README by @fabian-hiller in https://github.com/colinhacks/zod/pull/1695
- docs: Instruct users to return z.NEVER in .superRefine() when providing a type predicate by @zetaraku in https://github.com/colinhacks/zod/pull/1742
- Fix small typo in ERROR_HANDLING.md by @t-shiratori in https://github.com/colinhacks/zod/pull/1720
- Improve accuracy of the
isAsynctype guard by @aaronccasanova in https://github.com/colinhacks/zod/pull/1719 - fix: Fix
ZodCatchby @santosmarco-caribou in https://github.com/colinhacks/zod/pull/1733 - Fix datetime offset without comma by @ooga in https://github.com/colinhacks/zod/pull/1749
- Discriminated union example fails to parse by @matthewfallshaw in https://github.com/colinhacks/zod/pull/1713
- fix: [#1693] Tuple with empty items by @metuan in https://github.com/colinhacks/zod/pull/1712
- fix: #1668 email regex safari compat by @AnatoleLucet in https://github.com/colinhacks/zod/pull/1683
- docs: fix typo by @zetaraku in https://github.com/colinhacks/zod/pull/1699
- fix installation links in table of contents by @DetachHead in https://github.com/colinhacks/zod/pull/1700
- Updated
deno/lib/README.mdto matchzod/README.mdby @JacobWeisenburger in https://github.com/colinhacks/zod/pull/1791 - fix(#1743): Fix passing params in root class by @santosmarco-caribou in https://github.com/colinhacks/zod/pull/1756
- change the chaining order of nullish method by @p10ns11y in https://github.com/colinhacks/zod/pull/1702
- Propagate custom error type to ZodFormattedError subfields by @carlgieringer in https://github.com/colinhacks/zod/pull/1617
- fix deno literal test. by @igalklebanov in https://github.com/colinhacks/zod/pull/1794
- Document
.describe()by @rattrayalex in https://github.com/colinhacks/zod/pull/1819 - update homepage link in package.json by @Gpx in https://github.com/colinhacks/zod/pull/1830
- fix: compile error in sample code by @jtgi in https://github.com/colinhacks/zod/pull/1822
- Readme: Move "Coercion for primitives" section by @tordans in https://github.com/colinhacks/zod/pull/1842
- Readme: Add internal links "or" <-> "union" by @tordans in https://github.com/colinhacks/zod/pull/1846
- Readme: Add example for string validation for an optional field to chapter "Unions" by @tordans in https://github.com/colinhacks/zod/pull/1849
- Readme: Add intro to chapter Literals by @tordans in https://github.com/colinhacks/zod/pull/1877
- fix: faker.js link in readme by @markacola in https://github.com/colinhacks/zod/pull/1843
- Minor typo fix by @iamchandru6470 in https://github.com/colinhacks/zod/pull/1945
- chore(documentation): Update CHANGELOG to redirect to Github Releases by @mitchwd in https://github.com/colinhacks/zod/pull/1936
- fix: [#1839] remove caught errors from issues by @maxArturo in https://github.com/colinhacks/zod/pull/1926
- fix: [#1784] dark mode in the documentation by @fvckDesa in https://github.com/colinhacks/zod/pull/1932
- Allow also "[+-]hh" as datetime offset by @rafw87 in https://github.com/colinhacks/zod/pull/1797
- Feature/add resolves method to zod promise by @bolencki13 in https://github.com/colinhacks/zod/pull/1871
- test: add benchmark tests for date and symbol by @pnts-se in https://github.com/colinhacks/zod/pull/1796
- export the email regex by @andresBobsled in https://github.com/colinhacks/zod/pull/2007
- Add React form validation library to ecosystem by @crutchcorn in https://github.com/colinhacks/zod/pull/1999
- fix: make sure only mask keys with truthy values are respected at runtime @
.pick,.omit,.partial&.required. by @igalklebanov in https://github.com/colinhacks/zod/pull/1875 - fix: failing prettier checks on merge by @maxArturo in https://github.com/colinhacks/zod/pull/1969
- deny unexpected keys @
ZodObject's.omit(mask),.pick(mask),.required(mask)&.partial(mask)at compile time. by @igalklebanov in https://github.com/colinhacks/zod/pull/1564 - docs: punctuation by @jly36963 in https://github.com/colinhacks/zod/pull/1973
- fix[#1979]: Increment Email validation by @fvckDesa in https://github.com/colinhacks/zod/pull/1982
- test: additional unit-tests for object by @pnts-se in https://github.com/colinhacks/zod/pull/1729
New Contributors
- @fabian-hiller made their first contribution in https://github.com/colinhacks/zod/pull/1695
- @zetaraku made their first contribution in https://github.com/colinhacks/zod/pull/1742
- @t-shiratori made their first contribution in https://github.com/colinhacks/zod/pull/1720
- @aaronccasanova made their first contribution in https://github.com/colinhacks/zod/pull/1719
- @ooga made their first contribution in https://github.com/colinhacks/zod/pull/1749
- @matthewfallshaw made their first contribution in https://github.com/colinhacks/zod/pull/1713
- @metuan made their first contribution in https://github.com/colinhacks/zod/pull/1712
- @AnatoleLucet made their first contribution in https://github.com/colinhacks/zod/pull/1683
- @DetachHead made their first contribution in https://github.com/colinhacks/zod/pull/1700
- @p10ns11y made their first contribution in https://github.com/colinhacks/zod/pull/1702
- @carlgieringer made their first contribution in https://github.com/colinhacks/zod/pull/1617
- @rattrayalex made their first contribution in https://github.com/colinhacks/zod/pull/1819
- @Gpx made their first contribution in https://github.com/colinhacks/zod/pull/1830
- @jtgi made their first contribution in https://github.com/colinhacks/zod/pull/1822
- @tordans made their first contribution in https://github.com/colinhacks/zod/pull/1842
- @markacola made their first contribution in https://github.com/colinhacks/zod/pull/1843
- @iamchandru6470 made their first contribution in https://github.com/colinhacks/zod/pull/1945
- @mitchwd made their first contribution in https://github.com/colinhacks/zod/pull/1936
- @fvckDesa made their first contribution in https://github.com/colinhacks/zod/pull/1932
- @rafw87 made their first contribution in https://github.com/colinhacks/zod/pull/1797
- @bolencki13 made their first contribution in https://github.com/colinhacks/zod/pull/1871
- @joulev made their first contribution in https://github.com/colinhacks/zod/pull/1813
- @pnts-se made their first contribution in https://github.com/colinhacks/zod/pull/1796
- @andresBobsled made their first contribution in https://github.com/colinhacks/zod/pull/2007
- @crutchcorn made their first contribution in https://github.com/colinhacks/zod/pull/1999
- @jly36963 made their first contribution in https://github.com/colinhacks/zod/pull/1973
Full Changelog: https://github.com/colinhacks/zod/compare/v3.20.2...v3.20.3