Skip to main content

String Validator

A schema specifying constraints on a string node.

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.

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

Properties

Name@idTypeDescriptionInherited from
idschema:idstringThe identifier for this item.Entity
maxLengthstencila:maxLengthintegerThe maximum length for a string node. See note 1.StringValidator
metastencila:metaobjectMetadata associated with this item.Entity
minLengthstencila:minLengthintegerThe 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 : A string is valid if its length is less than, or exactly equal to, maxLength.
  2. minLength : A string is valid if its length is greater than, or exactly equal to, minLength.
  3. pattern : A string is valid if it is matched by the regular expression.

Available as

Source

This documentation was generated from StringValidator.schema.yaml.