Skip to content

docs: improve Ajv instance README guidance - #127

Merged
vacekj merged 1 commit into
mainfrom
docs/issue-113-ajv-instance-readme
Mar 28, 2026
Merged

docs: improve Ajv instance README guidance#127
vacekj merged 1 commit into
mainfrom
docs/issue-113-ajv-instance-readme

Conversation

@vacekj

@vacekj vacekj commented Mar 28, 2026

Copy link
Copy Markdown
Owner

Summary

  • clarify that validator.ajv must be configured before calling validate()
  • add a concrete ajv-formats example for schemas using format: "email"
  • update surrounding README examples and migration notes to point readers to the exposed Ajv instance

Closes #113


Note

Low Risk
Documentation-only updates; no runtime code changes, with minimal risk beyond potentially confusing guidance if incorrect.

Overview
Updates README.md to clarify Ajv configuration order: create a Validator, configure validator.ajv (formats/plugins/custom keywords), then call validate() so schemas compile with the configured Ajv instance.

Refreshes examples to instantiate validator explicitly (instead of destructuring from new Validator()), adds a concrete ajv-formats/format: "email" walkthrough, and adjusts the v2→v3 migration note and Ajv option link to point readers at the new guidance.

Written by Cursor Bugbot for commit 8fd070f. This will update automatically on new commits. Configure here.

@vacekj
vacekj merged commit e5d9a77 into main Mar 28, 2026
0 of 3 checks passed
@vacekj
vacekj deleted the docs/issue-113-ajv-instance-readme branch March 28, 2026 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve docs for usage of Ajv instance

1 participant