Method Standards.JSON.Validator()->validate_number()
- Method validate_number
private
string
validate_number(string
key
,mixed
value
,mapping
(string
:mixed
)schema
)- Description
Verify that the specified value is a number (integer or float) according to the specified schema. The following properties of schema are verified:
- minimum
If the schema has the property "minimum", then the value must be greater than or equal to the specified minimum.
- exclusiveMinimum
If the schema has the properties "minimum" and "exclusiveMinimum" is Standards.JSON.true, then the value must be greater than the specified minimum.
- maximum
If the schema has the property "maximum", then the value must be lower than or equal to the specified maximum.
- exclusiveMaximum
If the schema has the properties "maximum" and "exclusiveMaximum" is Standards.JSON.true, then the value must be lower than the specified minimum.
- multipleOf
If schema has the property "multipleOf", then the value must be an integer multiple of the specified multpleOf.