This package provides pre-built browser bundles for Ajv, the fastest JSON Schema validator for Node.js and browsers (v8.17.1, stable). It is a companion package to ajv (v8.x), offering UMD and ESM builds for direct inclusion in HTML or bundlers, useful for environments without Node.js module resolution. Key differentiator: eliminates the need for a bundler step when using Ajv in browsers; it includes support for JSON Schema draft-07/2019-09/2020-12 and optional formats. Releases follow ajv releases with minor delays for bundle generation.
npm install ajv-distNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to use the UMD bundle in a browser to compile and validate a schema.
Use standard JSON Schema drafts (07, 2019-09, 2020-12) instead.
Use the ESM bundle or set strict: false in options if you need to ignore unknown keywords.
Either add the formats manually or use ajv-formats package and bundle it.
Use ajv v6 and ajv-dist v6.x for compatibility.
Ensure <script src="path/to/ajv.min.js"></script> appears before any script using Ajv.
Use ajv-dist instead: either use the UMD tag or import from 'ajv-dist/ajv.esm.js'.
Instantiate: const ajv = new Ajv(); then call ajv.compile(...).
Set addUsedSchema: false or strict: false, or use a draft that supports $comment (2019-09/2020-12).