Sourced from zod's releases.
v3.24.1
Commits:
- 0c6cbbdd1315683dd3d589fbdc5765c26431dcc9 Undeprecate .nonempty()
- 4e219d6ad9d5e56e20afd7423092f506400a29e4 Bump min TS version to 5.0
- 65adeeacef0274abbda5438470a3d2bfd376256d v3.24.1
v3.24.0
Implement
@standard-schema/spec
This is the first version of Zod to implement the Standard Schema spec. This is a new community effort among several validation library authors to implement a common interface, with the goal of simplifying the process of integrating schema validators with the rest of the ecosystem. Read more about the project and goals here.
z.string().jwt()
Thanks to
@Mokshit06
and@Cognition-Labs
for this contribution!To verify that a string is a valid 3-part JWT.
z.string().jwt();
⚠️ This does not verify your JWT cryptographically! It merely ensures its in the proper format. Use a library like
jsonwebtoken
to verify the JWT signature, parse the token, and read the claims.To constrain the JWT to a specific algorithm:
z.string().jwt({ alg: "RS256" });
z.string().base64url()
Thank you to
@marvinruder
!To complement the JWT validation, Zod 3.24 implements a standalone
.base64url()
string validation API. (The three elements of JWTs are base64url-encoded JSON strings.)z.string().base64url()
This functionality is available along the standard
z.string().base64()
validator added in Zod 3.23.
z.string().cidr()
Thanks to
@wataryooou
for their work on this!A validator for CIDR notation for specifying IP address ranges, e.g.
192.24.12.0/22
.
... (truncated)
65adeea
v3.24.14e219d6
Bump min TS version to 5.00c6cbbd
Undeprecate .nonempty()b333f96
Fix deno tests964d622
Fix lintb68c05f
feat: Add JWT string validator (#3893)c1dd537
Adds frrm
package to documentation (#3818)69a1798
Implement Standard Schema spec (#3850)963386d
Fix lint3755146
Remove createParams cascade from .array() (#3530)This version was pushed to npm by colinhacks, a new releaser for zod since your current version.