Page Contents

Home > @loopback/rest > RequestBodyValidationOptions > ajvErrorTransformer

RequestBodyValidationOptions.ajvErrorTransformer property

A function that transform the ErrorObjects reported by AJV. This could be used for error messages customization, localization, etc.

Signature:

ajvErrorTransformer?: (errors: ajv.ErrorObject[]) => ajv.ErrorObject[];