diff --git a/src/JsonSchema/Constraints/ObjectConstraint.php b/src/JsonSchema/Constraints/ObjectConstraint.php index 9dc0b188..acaaf7c3 100644 --- a/src/JsonSchema/Constraints/ObjectConstraint.php +++ b/src/JsonSchema/Constraints/ObjectConstraint.php @@ -77,7 +77,7 @@ public function validateElement($element, $matches, $objectDefinition = null, $p // no additional properties allowed if (!in_array($i, $matches) && $additionalProp === false && $this->inlineSchemaProperty !== $i && !$definition) { - $this->addError($path, "The property " . $i . " is not defined and the definition does not allow additional properties"); + $this->addError($path, "The property - " . $i . " - is not defined and the definition does not allow additional properties"); } // additional properties defined diff --git a/tests/JsonSchema/Tests/Constraints/AdditionalPropertiesTest.php b/tests/JsonSchema/Tests/Constraints/AdditionalPropertiesTest.php index 9df7ae39..07e7f098 100644 --- a/tests/JsonSchema/Tests/Constraints/AdditionalPropertiesTest.php +++ b/tests/JsonSchema/Tests/Constraints/AdditionalPropertiesTest.php @@ -36,7 +36,7 @@ public function getInvalidTests() array( array( 'property' => '', - 'message' => 'The property additionalProp is not defined and the definition does not allow additional properties' + 'message' => 'The property - additionalProp - is not defined and the definition does not allow additional properties' ) ) ),