forked from rjsf-team/react-jsonschema-form
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added ajvOptionsOverrides to support user-provided AJV options overri…
…ding - Updated `CustomValidatorOptionsType` to add `ajvOptionsOverrides` - Updated the `createAjvInstance()` function to spread any `ajvOptionsOverrides` on top of the `AJV_CONFIG` - Updated `AJV6Validator` constructor to pass `ajvOptionsOverrides` to `createAjvInstance()` - Updated tests to add test-case for the `$data` flag mentioned in rjsf-team#1668
- Loading branch information
1 parent
b09d6d9
commit 6e2f0ed
Showing
4 changed files
with
22 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
import { Options } from 'ajv'; | ||
|
||
/** The type describing how to customize the AJV6 validator | ||
*/ | ||
export interface CustomValidatorOptionsType { | ||
/** The list of additional meta schemas that the validator can access */ | ||
additionalMetaSchemas?: ReadonlyArray<object>; | ||
/** The set of additional custom formats that the validator will support */ | ||
customFormats?: { [k: string]: string | RegExp | ((data: string) => boolean) }; | ||
/** The set of config overrides that will be passed to the AJV validator constructor on top of the defaults */ | ||
ajvOptionsOverrides?: Options; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters