Skip to main content

StringValidator

A schema specifying constraints on a string node.

Properties#

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

Related#

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.
  5. Available as JSON-LD.
  6. Available as JSON Schema.
  7. This documentation was generated from StringValidator.schema.yaml.