v1.0.2
What's Changed
#4
This removes the error()
method and instead introduces a new variant of validate()
named validationResult()
that returns a full \Opis\JsonSchema\ValidationResult which bundles both isValid
and the array of errors, in a single object.
Because SchemaValidatorProvider
is a singleton, the previous error()
(and corresponding protected attribute) were effectively a global variable. This new design fixes that by making errors only available in the response to a specific validate call, you can't get errors for the wrong invocation.
Full Changelog: v1.0.1...v1.0.2