Closed
Description
Hi!
Is it possible to get metadata of field by InvalidValue
exception?
For example I want to know if failed field marked as required in the schema.
try {
$schema = Schema::import($schemaFile);
$schema->in((object)$data);
} catch (Exception $exception) {
// something like this JsonPointer::get((object)$schema, $exception->getSchemaPointer())->required;
// or
// $meta = $schema->getByPointer(Schema$exception->getSchemaPointer())->required;
}
Thanx!
Metadata
Metadata
Assignees
Labels
No labels