{
  "title": "StringValidator",
  "@id": "stencila:StringValidator",
  "extends": "Entity",
  "role": "validation",
  "status": "unstable",
  "category": "data",
  "description": "A schema specifying constraints on a string node.",
  "$comment": "A node will be valid against the schema if it is a string that\nmeets the schemas `minLength`, `maxLength` and `pattern` properties.\nAnalogous to the JSON Schema `string` validation [type](https://json-schema.org/draft/2019-09/json-schema-validation.html#rfc.section.6.1.1).\n",
  "properties": {
    "type": {
      "@id": "schema:type",
      "description": "The name of the type.",
      "type": "string",
      "enum": [
        "StringValidator"
      ],
      "default": "StringValidator",
      "from": "Entity"
    },
    "id": {
      "@id": "schema:id",
      "description": "The identifier for this item.",
      "type": "string",
      "from": "Entity"
    },
    "meta": {
      "@id": "stencila:meta",
      "description": "Metadata associated with this item.",
      "type": "object",
      "from": "Entity"
    },
    "minLength": {
      "@id": "stencila:minLength",
      "type": "number",
      "minimum": 0,
      "description": "The minimum length for a string node.",
      "$comment": "A string is valid if its length is greater than, or exactly equal to, `minLength`.\n",
      "from": "StringValidator"
    },
    "maxLength": {
      "@id": "stencila:maxLength",
      "type": "number",
      "minimum": 0,
      "description": "The maximum length for a string node.",
      "$comment": "A string is valid if its length is less than, or exactly equal to, `maxLength`.\n",
      "from": "StringValidator"
    },
    "pattern": {
      "@id": "stencila:pattern",
      "type": "string",
      "description": "A regular expression that a string node must match.",
      "$comment": "A string is valid if it is matched by the regular expression.\n",
      "from": "StringValidator"
    }
  },
  "file": "StringValidator.schema.yaml",
  "children": [],
  "descendants": [],
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://schema.stenci.la/v0/StringValidator.schema.json",
  "source": "https://github.com/stencila/schema/blob/master/StringValidator.schema.yaml",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "type"
  ],
  "propertyAliases": {}
}
