mapClassError
@tsed/ajv
Usage
typescript
import { mapClassError } from "@tsed/ajv";Overview
ts
function mapClassError(error: AjvErrorObject, targetType: Type<any>): string | undefined;error (
AjvErrorObject): AJV error object to transform.targetType (
Type<any>): Class used to resolve property metadata.
Description
Rewrite class-related AJV messages using Ts.ED metadata.
For missing required properties, this method replaces the property key by the store-resolved property name when aliasing/naming is configured.