The schema may be passed as file path or as object returned from
json_decode($schemaFile).
public validate ( mixed $data, string | object | null $schema = null ) : string[] | ||
$data | mixed | The decoded JSON data |
$schema | string | object | null | The schema file or object. If `null`, the validator will look for a `$schema` property |
return | string[] | The errors found during validation. Returns an empty array if no errors were found |