# What changed in zod-validation-error

> 8 changes in zod-validation-error 2 to 5 from its official release notes, upgrade guides and advisories: 5 breaking. Each one cited. Sources checked 2026-10-27. HTML: https://unstale.sh/npm/zod-validation-error/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## zod-validation-error 5

### Breaking changes

- Error messages now consistently follow the expected <expectation>, received <realization> format, changing their wording. (5.0.0) — [release notes](https://github.com/causaly/zod-validation-error/releases/tag/v5.0.0)

### Behavior and default changes

- Whether a value is included in an error message now depends on the reportInput option. (5.0.0) — [release notes](https://github.com/causaly/zod-validation-error/releases/tag/v5.0.0)

## zod-validation-error 4

### Breaking changes

- The API now separates error mapping from message building, changing how developers use these responsibilities. (4.0.0) — [release notes](https://github.com/causaly/zod-validation-error/blob/HEAD/CHANGELOG.md)
- The package’s default export is now v4, affecting which API developers receive when they use the default import. (4.0.0) — [release notes](https://github.com/causaly/zod-validation-error/blob/HEAD/CHANGELOG.md)

### Behavior and default changes

- zod v4 is now supported as a peer dependency, allowing developers to use this package with that version. (4.0.0) — [release notes](https://github.com/causaly/zod-validation-error/blob/HEAD/CHANGELOG.md)

## zod-validation-error 3

### Breaking changes

- The second parameter now accepts ErrorOptions instead of Array<ZodIssue>; when cause is a ZodError, its issues are exposed through error.details. (3.0.0) — [release notes](https://github.com/causaly/zod-validation-error/releases/tag/v3.0.0)

### Fixes and other changes

- Restores compatibility with zod 3.24.4 after compatibility was inadvertently broken by adopting zod/v3 import paths. (3.5.4) — [release notes](https://github.com/causaly/zod-validation-error/releases/tag/v3.5.4)

## zod-validation-error 2

### Breaking changes

- toValidationError() now returns only ValidationError instead of Error | ValidationError, affecting users of this method. (2.0.0) — [release notes](https://github.com/causaly/zod-validation-error/releases/tag/v2.0.0)
