---
lang: en
title: 'API docs: rest.validationoptions'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/rest
permalink: /doc/en/lb4/apidocs.rest.validationoptions.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/rest](./rest.md) &gt; [ValidationOptions](./rest.validationoptions.md)

## ValidationOptions interface

Options for request body validation using AJV

<b>Signature:</b>

```typescript
export interface ValidationOptions extends AjvOptions 
```
<b>Extends:</b> AjvOptions

## Properties

|  Property | Type | Description |
|  --- | --- | --- |
|  [ajvErrors?](./rest.validationoptions.ajverrors.md) | [AjvErrorOptions](./rest.ajverroroptions.md) | <i>(Optional)</i> Enable custom error messages in JSON-Schema for AJV validator from https://github.com/epoberezkin/ajv-errors - <code>true</code>: Enable <code>ajv-errors</code> - <code>AjvErrorOptions</code>: Enable <code>ajv-errors</code> with options |
|  [ajvErrorTransformer?](./rest.validationoptions.ajverrortransformer.md) | (errors: ErrorObject\[\]) =&gt; ErrorObject\[\] | <i>(Optional)</i> A function that transform the <code>ErrorObject</code>s reported by AJV. This could be used for error messages customization, localization, etc. |
|  [ajvFactory?](./rest.validationoptions.ajvfactory.md) | (options: AjvOptions) =&gt; Ajv | <i>(Optional)</i> A factory to create Ajv instance |
|  [ajvKeywords?](./rest.validationoptions.ajvkeywords.md) | string\[\] | <i>(Optional)</i> Enable additional AJV keywords from https://github.com/epoberezkin/ajv-keywords - <code>string[]</code>: Add an array of keywords from <code>ajv-keywords</code> |
|  [compiledSchemaCache?](./rest.validationoptions.compiledschemacache.md) | [SchemaValidatorCache](./rest.schemavalidatorcache.md) | <i>(Optional)</i> Custom cache for compiled schemas by AJV. This setting makes it possible to skip the default cache. |
|  [prohibitedKeys?](./rest.validationoptions.prohibitedkeys.md) | string\[\] | <i>(Optional)</i> An array of keys to be rejected, such as <code>__proto__</code>. |


