mapErrors
@tsed/ajv
Usage
typescript
import { mapErrors } from "@tsed/ajv";Overview
ts
function mapErrors(errors: ErrorObject[], options: MapErrorsOptions): AjvValidationError;errors (
ErrorObject[]): Raw AJV error objects.options (
MapErrorsOptions): Validation context used to enrich error payloads.
Description
Map raw AJV errors to framework-level validation error output.
Enriches errors with collection/model information and contextual data values, then formats each message via the configured errorFormatter.