Create a validator
Optionaloptions: { draft?: CfWorkerSchemaDraft; shortcircuit?: boolean }Configuration options
Optionaldraft?: CfWorkerSchemaDraftJSON Schema draft version to use (default: '2020-12')
Optionalshortcircuit?: booleanIf true, stop validation after first error (default: true)
Create a validator for the given JSON Schema
Unlike AJV, this validator is not cached internally
Standard JSON Schema object
A validator function that validates input data
Example