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.
Properties
The NumberValidator
type has these properties:
Name | Description | Type | Inherited from | JSON-LD @id |
Aliases |
---|---|---|---|---|---|
id |
The identifier for this item. | String |
Entity |
schema:id |
- |
minimum |
The inclusive lower limit for a numeric node. | Number |
- | stencila:minimum |
- |
exclusiveMinimum |
The exclusive lower limit for a numeric node. | Number |
- | stencila:exclusiveMinimum |
exclusive-minimum , exclusive_minimum |
maximum |
The inclusive upper limit for a numeric node. | Number |
- | stencila:maximum |
- |
exclusiveMaximum |
The exclusive upper limit for a numeric node. | Number |
- | stencila:exclusiveMaximum |
exclusive-maximum , exclusive_maximum |
multipleOf |
A number that a numeric node must be a multiple of. | Number |
- | stencila:multipleOf |
multiple-of , multiple_of |
Related
The NumberValidator
type is related to these types:
- Parents:
Entity
- Children:
IntegerValidator
Formats
The NumberValidator
type can be encoded (serialized) to, and/or decoded (deserialized) from, these formats:
Format | Encoding | Decoding | Support | Notes |
---|---|---|---|---|
DOM HTML | 🟢 No loss | |||
HTML | 🔷 Low loss | |||
JATS | ||||
Markdown | ⚠️ High loss | Encoded using implemented function | ||
Stencila Markdown | ⚠️ High loss | |||
Quarto Markdown | ⚠️ High loss | |||
MyST Markdown | ⚠️ High loss | |||
LLM Markdown | ⚠️ High loss | |||
LaTeX | 🔷 Low loss | 🔷 Low loss | ||
🔷 Low loss | ||||
Plain text | ⚠️ High loss | |||
IPYNB | 🔷 Low loss | 🔷 Low loss | ||
Microsoft Word DOCX | 🔷 Low loss | 🔷 Low loss | ||
OpenDocument ODT | 🔷 Low loss | 🔷 Low loss | ||
TeX | 🔷 Low loss | 🔷 Low loss | ||
JSON | 🟢 No loss | 🟢 No loss | ||
JSON+Zip | 🟢 No loss | 🟢 No loss | ||
JSON5 | 🟢 No loss | 🟢 No loss | ||
JSON-LD | 🟢 No loss | 🟢 No loss | ||
CBOR | 🟢 No loss | 🟢 No loss | ||
CBOR+Zstandard | 🟢 No loss | 🟢 No loss | ||
YAML | 🟢 No loss | 🟢 No loss | ||
Lexical JSON | 🔷 Low loss | 🔷 Low loss | ||
Koenig JSON | 🔷 Low loss | 🔷 Low loss | ||
Pandoc AST | 🔷 Low loss | 🔷 Low loss | ||
Directory | ||||
Stencila Web Bundle | ||||
Debug | 🔷 Low loss |
Bindings
The NumberValidator
type is represented in:
- JSON-LD
- JSON Schema
- Python class
NumberValidator
- Rust struct
NumberValidator
- TypeScript class
NumberValidator
Source
This documentation was generated from NumberValidator.yaml
by docs_types.rs
.