ajv-errors is a JavaScript add-on for the Ajv JSON Schema validator that lets you define custom error messages using the `errorMessage` keyword. It rewrites Ajv validation errors into more readable, schema-specific messages, including per keyword, per property or item, and default messages when no specific message is provided.
Project status
- The repository (ajv-validator/ajv-errors, a helper for custom JSON Schema error messages with Ajv) shows no published version updates since 2021-03-27, and the last upstream push was 2023-10-10, which suggests it is effectively quiet rather than actively maintained as of 2026-08-12.
- Apparent update cadence has been irregular, with updates spaced across 2020-12, 2021-03, and 2021-03, followed by a long gap with no further version updates noted.
AI summary generated
Recent updates
v3.0.0
v3.0.0 upgrades ajv-errors to work with Ajv v8. The core behavior change is switching error field usage from Ajv's old dataPath to the new instancePath throughout error-message generation and error matching.
Breakingv2.0.1
v2.0.1 is a small patch release focused on fixing how ajv-errors generates standalone code when the `errorMessage` keyword is used. The code change adjusts the code generation for an internal RegExp used to parse `dataPath` segments.
v2.0.0
Release v2.0.0 is positioned as an AJV v7-compatible rewrite. The actual code diff is small, but it includes a new AJV keyword mapping for customizing error messages.
Featuresv2.0.0-beta.0
v2.0.0-beta.0 is a major rewrite of ajv-errors to target Ajv v7. The release notes only mention the rewrite for Ajv v7, with no details on behavioral or packaging changes.
v1.0.1
v1.0.1 ships a fix related to how custom error messages are generated for the JSON-Schema `required` keyword when only some properties have `errorMessage.required` entries. The code change updates the error-message rendering logic and adds a unit test covering the partial-property case.
v1.0.0
This release adds support for a fallback (default) custom error message via the `_` property on the `errorMessage` keyword. The README and tests were updated accordingly. Internally, the error-message template logic was refactored to extract a single message (`errorMessage._` for object forms, or the string value itself) and apply it to any errors not covered by keyword/property/item-specific messages.
Featuresv0.5.0
v0.5.0 adds support for providing different errorMessage strings for specific properties within the JSON Schema keywords "required" and "dependencies". Instead of treating these keywords monolithically, the implementation maps Ajv error params to property-specific messages.
Featuresv0.4.0
v0.4.0 adds support for two new configuration options, keepErrors and singleError, affecting how the errorMessages keyword rewrites Ajv validation errors. The implementation changes the main exported function to accept an options argument and refactors the errorMessage code generation to conditionally keep original errors and optionally merge multiple generated error messages into one.
Featuresv0.3.0
v0.3.0 adds support for using templates inside the custom `errorMessage` keyword values. The implementation compiles template functions and substitutes values based on JSON-pointer-like expressions found in `${...}` placeholders when generating error messages.
Featuresv0.2.0
v0.2.0 extends `ajv-errors` so `errorMessage` objects can target specific schema parts, specifically `properties` and `items`. The implementation also changes how Ajv error locations are matched and formatted, including ensuring JSON Pointer mode is enabled.
Features