Skip to content

Commit

Permalink
Wrong constraint of error
Browse files Browse the repository at this point in the history
  • Loading branch information
dishuostec committed Jun 2, 2016
1 parent 5af8a31 commit 3ba138c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/JsonSchema/Constraints/NumberConstraint.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,));
Expand Down

0 comments on commit 3ba138c

Please sign in to comment.