Skip to content

Commit b5aac5b

Browse files
authored
Fix wrong error reported when the value is smaller than the maximum.
Can be tested with the following: *Schema* { "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://json-schema.org/draft-07/schema#", "description": "Representation of the core response to the front end", "type": "object", "required": ["testProperty"], "properties": { "testProperty": { "type": "integer", "minimum": 50, "maximum: 60 } } } *JSON* { "testProperty": 60 }
1 parent 06186e5 commit b5aac5b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Schema.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ private function processNumeric($data, $path)
361361
} else {
362362
if ($data > $this->maximum) {
363363
$this->fail(new NumericException(
364-
'Value less than ' . $this->minimum . ' expected, ' . $data . ' received',
364+
'Value less than ' . $this->maximum . ' expected, ' . $data . ' received',
365365
NumericException::MAXIMUM), $path);
366366
}
367367
}

0 commit comments

Comments
 (0)