Skip to content

Commit e80fba5

Browse files
Merge pull request #10 from allentje/master
Enhanced error message with JSON schema assertion
2 parents 8c25dd4 + 73254fb commit e80fba5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Constraint/JsonValueMatchesSchema.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ protected function additionalFailureDescription($other): string
7070
$validator->check($other, $this->schema);
7171

7272
return implode("\n", array_map(function ($error) {
73-
return $error['message'];
73+
return sprintf("[%s] %s", $error['property'], $error['message']);
7474
}, $validator->getErrors()));
7575
}
7676

0 commit comments

Comments
 (0)