schema

StringValidator

A schema specifying constraints on a string node.

Properties

Name @id Type Description Inherited from
id schema:id string The identifier for this item. Entity
maxLength stencila:maxLength number The maximum length for a string node. See note 3. StringValidator
meta stencila:meta object Metadata associated with this item. Entity
minLength stencila:minLength number The minimum length for a string node. See note 4. StringValidator
pattern stencila:pattern string A regular expression that a string node must match. See note 2. StringValidator

Notes

  1. A node will be valid against the schema if it is a string that meets the schemas minLength, maxLength and pattern properties. Analogous to the JSON Schema string validation type.
  2. pattern : A string is valid if it is matched by the regular expression.
  3. maxLength : A string is valid if its length is less than, or exactly equal to, maxLength.
  4. minLength : A string is valid if its length is greater than, or exactly equal to, minLength.

Available as

Source

This documentation was generated from StringValidator.schema.yaml.