Create an AJV validator
Optionalajv: AjvOptional pre-configured AJV instance. If not provided, a default instance will be created.
Create a validator for the given JSON Schema
The validator is compiled once and can be reused multiple times.
If the schema has an $id, it will be cached by AJV automatically.
Standard JSON Schema object
A validator function that validates input data
Example: Use with default AJV instance (recommended)
Example: Use with custom AJV instance
See
CfWorkerJsonSchemaValidatorfor an edge-runtime-compatible alternative