Skip to main content

NumberValidator

A validator specifying the constraints on a numeric node.

Properties#

Name@idTypeDescriptionInherited from
typeschema:type'NumberValidator'The name of the type.Entity
exclusiveMaximumstencila:exclusiveMaximumnumberThe exclusive upper limit for a numeric node. See note 3.NumberValidator
exclusiveMinimumstencila:exclusiveMinimumnumberThe exclusive lower limit for a numeric node. See note 4.NumberValidator
idschema:idstringThe identifier for this item.Entity
maximumstencila:maximumnumberThe inclusive upper limit for a numeric node. See note 5.NumberValidator
metastencila:metaobjectMetadata associated with this item.Entity
minimumstencila:minimumnumberThe inclusive lower limit for a numeric node. See note 6.NumberValidator
multipleOfstencila:multipleOfnumberA number that a numeric node must be a multiple of. See note 2.NumberValidator

Related#

Notes#

  1. 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.
  2. multipleOf : A number is valid only if division by this value results in an integer.
  3. exclusiveMaximum : A number is valid only if it has a value less than (not equal to) exclusiveMaximum.
  4. exclusiveMinimum : A number is valid only if it has a value greater than (not equal to) exclusiveMinimum.
  5. maximum : A number is valid if it is less than, or exactly equal to, maximum.
  6. minimum : A number is valid if it is greater than, or exactly equal to, minimum.
  7. Available as JSON-LD.
  8. Available as JSON Schema.
  9. This documentation was generated from NumberValidator.schema.yaml.