Skip to content

Commit 62ac187

Browse files
committed
refactor: improve any of error messages
1 parent 998db2c commit 62ac187

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/JsonSchema/Constraints/Drafts/Draft06/AnyOfConstraint.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,11 @@ public function check(&$value, $schema = null, ?JsonPointer $path = null, $i = n
3636
$schemaConstraint->check($value, $anyOfSchema, $path, $i);
3737

3838
if ($schemaConstraint->isValid()) {
39+
$this->errorBag()->reset();
3940
return;
4041
}
42+
43+
$this->addErrors($schemaConstraint->getErrors());
4144
} catch (ValidationException $e) {
4245
}
4346
}

0 commit comments

Comments
 (0)