Number Validator
A validator specifying the constraints on a numeric node.
A node will be valid if it is a number that meets the maximum
, multipleOf
etc properties. Analogous to the JSON Schema number
validation type. Note that the IntegerValidator
type extends this validator with the additional constraint that the number have no fractional part.
This schema type is marked as unstable ⚠️ and is subject to change.
Properties
Name | @id | Type | Description | Inherited from |
---|---|---|---|---|
exclusiveMaximum | stencila:exclusiveMaximum | number | The exclusive upper limit for a numeric node. See note 1. | NumberValidator |
exclusiveMinimum | stencila:exclusiveMinimum | number | The exclusive lower limit for a numeric node. See note 2. | NumberValidator |
id | schema:id | string | The identifier for this item. | Entity |
maximum | stencila:maximum | number | The inclusive upper limit for a numeric node. See note 3. | NumberValidator |
meta | stencila:meta | object | Metadata associated with this item. | Entity |
minimum | stencila:minimum | number | The inclusive lower limit for a numeric node. See note 4. | NumberValidator |
multipleOf | stencila:multipleOf | number | A number that a numeric node must be a multiple of. See note 5. | NumberValidator |
Notes
- exclusiveMaximum : A number is valid only if it has a value less than (not equal to)
exclusiveMaximum
. - exclusiveMinimum : A number is valid only if it has a value greater than (not equal to)
exclusiveMinimum
. - maximum : A number is valid if it is less than, or exactly equal to,
maximum
. - minimum : A number is valid if it is greater than, or exactly equal to,
minimum
. - multipleOf : A number is valid only if division by this value results in an integer.
Related
- Parent: Validator
- Descendants: None
Available as
- JSON-LD
- JSON Schema
- Python
class NumberValidator
- TypeScript
interface NumberValidator
- R
class NumberValidator
- Rust
struct NumberValidator
Source
This documentation was generated from NumberValidator.schema.yaml.