From 3ba138c6a12f82dde78c64d4b54d0641d4bcf1f7 Mon Sep 17 00:00:00 2001 From: dishuostec Date: Thu, 2 Jun 2016 13:55:17 +0800 Subject: [PATCH] Wrong constraint of error --- src/JsonSchema/Constraints/NumberConstraint.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/JsonSchema/Constraints/NumberConstraint.php b/src/JsonSchema/Constraints/NumberConstraint.php index c5aaf6a3..35560c13 100644 --- a/src/JsonSchema/Constraints/NumberConstraint.php +++ b/src/JsonSchema/Constraints/NumberConstraint.php @@ -46,7 +46,7 @@ public function check($element, $schema = null, $path = null, $i = null) $this->addError($path, "Must have a maximum value of " . $schema->maximum, 'maximum', array('maximum' => $schema->maximum,)); } } else { - $this->addError($path, "Use of exclusiveMaximum requires presence of maximum", 'missingMinimum'); + $this->addError($path, "Use of exclusiveMaximum requires presence of maximum", 'missingMaximum'); } } else if (isset($schema->maximum) && $element > $schema->maximum) { $this->addError($path, "Must have a maximum value of " . $schema->maximum, 'maximum', array('maximum' => $schema->maximum,));