Skip to main content

String Validator

A schema specifying constraints on a string node.

!array('A node will be valid against the schema if it is a string that meets the schemas ')minLength!array(', ')maxLength!array(' and ')pattern!array(' properties. Analogous to the JSON Schema ')string!array(' validation ')!array('type')!array('.')

This schema type is marked as unstable ⚠️ and is subject to change.

Properties#

Name@idTypeDescriptionInherited from
idschema:idstringThe identifier for this item.Entity
maxLengthstencila:maxLengthnumberThe maximum length for a string node. See note 1.StringValidator
metastencila:metaobjectMetadata associated with this item.Entity
minLengthstencila:minLengthnumberThe minimum length for a string node. See note 2.StringValidator
patternstencila:patternstringA regular expression that a string node must match. See note 3.StringValidator

Notes#

  1. maxLength : !array('A string is valid if its length is less than, or exactly equal to, ')maxLength!array('.')
  2. minLength : !array('A string is valid if its length is greater than, or exactly equal to, ')minLength!array('.')
  3. pattern : !array('A string is valid if it is matched by the regular expression.')

Related#

Available as#

Source#

This documentation was generated from StringValidator.schema.yaml.