minimum : Number
minimum
NumberValidation succeeds if the numeric instance is greater than or greater than or equal to the given number, depending on the value of exclusiveMinimum, if any
| Value |
This keyword must be set to a number
Hint: Use the jsonschema metaschema and jsonschema lint commands to catch keywords set to invalid values
|
|---|---|
| Kind | Assertion |
| Applies To | Number |
| Base Dialect | Draft 4 |
| Changed In | None |
| Introduced In | Draft 1 |
| Vocabulary | Validation |
| Specification | https://json-schema.org/draft-04/draft-fge-json-schema-validation-00#rfc.section.5.1.3 |
| Metaschema | http://json-schema.org/draft-04/schema# |
| Official Tests | draft4/minimum.json |
| Default | None |
| Annotation | None |
| Affected By |
|
| Affects | None |
| Also See |
|
The minimum keyword restricts number instances to be greater than or equal to
the given number.
Remember that JSON Schema is a constraint-driven language.
Therefore, non-number instances successfully validate against this
keyword. If needed, make use of the type keyword to constraint
the accepted type accordingly.
Examples
{
"$schema": "http://json-schema.org/draft-04/schema#",
"minimum": 10
}10.1119.9910.010"100000"{
"$schema": "http://json-schema.org/draft-04/schema#",
"minimum": -2.1
}-2.09-2-2.11-3-2.1"100000"