{
  "$id": "http://gov.uk/schema/v1.0.0/definition/condition/text",
  "_name": "definition.condition.text",
  "title": "Text condition properties",
  "allOf": [
    {
      "$ref": "http://gov.uk/schema/v1.0.0/definition/condition/base"
    }
  ],
  "properties": {
    "operator": {
      "title": "Operator",
      "type": "string",
      "enum": [
        "is",
        "startsWith",
        "endsWith",
        "includes",
        "match"
      ]
    },
    "value": {
      "title": "Value"
    }
  },
  "if": {
    "required": ["valueType"]
  },
  "then": {
    "$ref": "http://gov.uk/schema/v1.0.0/definition/condition/valuetype"
  },
  "else": {
    "properties": {
      "value": {
        "type": "string"
      }
    }
  },
  "required": [
    "operator",
    "value"
  ],
  "category": [
    "definition"
  ]
}
