Skip to content

1.0.0

Choose a tag to compare

@alexstandiford alexstandiford released this 19 Apr 19:16
· 1 commit to main since this release

Initial release of the PHPNomad JSON Schema validation contract.

What's in the box

  • JsonSchemaValidatorStrategy — single validate() entry point; returns true on success, throws on failure.
  • ValidationError — exception carrying the full collection of failures so callers can report every violation in one pass.
  • ValidationFailurereadonly value type with path, message, and keyword.

Requirements

PHP 8.2 or newer.

Using it

Interfaces-only package. Pair it with an implementation — a wrapper around opis/json-schema, or any other validator that exposes per-violation metadata.

composer require phpnomad/json-schema