npm / zod-validation-error
zod-validation-error
What changed in zod-validation-error 2 to 5, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-27.
5 breaking2 behavior and defaults1 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initzod-validation-error 52 changes
Breaking changes 1
Error messages now consistently follow the expected <expectation>, received <realization> format, changing their wording.
Behavior and default changes 1
Whether a value is included in an error message now depends on the reportInput option.
zod-validation-error 43 changes
Breaking changes 2
The API now separates error mapping from message building, changing how developers use these responsibilities.
The package’s default export is now v4, affecting which API developers receive when they use the default import.
Behavior and default changes 1
zod v4 is now supported as a peer dependency, allowing developers to use this package with that version.
zod-validation-error 32 changes
Breaking changes 1
The second parameter now accepts ErrorOptions instead of Array<ZodIssue>; when cause is a ZodError, its issues are exposed through error.details.
Fixes and other changes 1
Restores compatibility with zod 3.24.4 after compatibility was inadvertently broken by adopting zod/v3 import paths.
zod-validation-error 21 changes
Breaking changes 1
toValidationError() now returns only ValidationError instead of Error | ValidationError, affecting users of this method.