Skip to content

Commit 1a2e961

Browse files
committed
remove duplicate draft3 'required' validation in Constraints\Object
1 parent 64e8fb4 commit 1a2e961

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

src/JsonSchema/Constraints/Object.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,6 @@ public function validateElement($element, $matches, $objectDefinition = null, $p
7575
$property = $this->getProperty($element, $i, new Undefined());
7676
$definition = $this->getProperty($objectDefinition, $i);
7777

78-
//required property
79-
if ($this->getProperty($definition, 'required') && $property instanceof Undefined) {
80-
$this->addError($path, "the property " . $i . " is required");
81-
}
82-
8378
//no additional properties allowed
8479
if (!in_array($i, $matches) && $additionalProp === false && $this->inlineSchemaProperty !== $i && !$definition) {
8580
$this->addError($path, "The property " . $i . " is not defined and the definition does not allow additional properties");

0 commit comments

Comments
 (0)