schema

NumberValidator

A validator specifying the constraints on a numeric node.

Properties

Name @id Type Description Inherited from
exclusiveMaximum stencila:exclusiveMaximum number The exclusive upper limit for a numeric node. See note 3. NumberValidator
exclusiveMinimum stencila:exclusiveMinimum number The exclusive lower limit for a numeric node. See note 4. 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 5. 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 6. NumberValidator
multipleOf stencila:multipleOf number A number that a numeric node must be a multiple of. See note 2. NumberValidator

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.

Available as

Source

This documentation was generated from NumberValidator.schema.yaml.