> For the complete documentation index, see [llms.txt](https://developers.docstudio.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.docstudio.com/automation-types/validation-and-logic.md).

# Validation and Logic

{% hint style="info" %}
**Validation and logic** type — validate structured data and evaluate conditions during an automation process.\
Use it to verify that input data matches a required schema or to control further processing based on XPath or JSONPath expressions.
{% endhint %}

### xsd-validator

Validates input data against an XSD schema.

```json
{
  "type": "xsd-validator",
  "configSchema": "{\"$schema\":\"http://json-schema.org/draft-07/schema\",\"additionalProperties\":false,\"title\":\"XSD Validator\",\"type\":\"object\",\"properties\":{\"xsd\":{\"description\":\"XSD file or URL\",\"type\":\"string\"}},\"required\":[\"xsd\"]}",
  "multipleInput": false,
  "outputParam": []
}
```

### if-condition

Evaluates a condition using XPath or JSONPath.

```json
{
  "type": "if-condition",
  "configSchema": "{\"$schema\":\"http://json-schema.org/draft-07/schema\",\"additionalProperties\":false,\"title\":\"If Condition\",\"type\":\"object\",\"properties\":{\"inputFilename\":{\"description\":\"Input filename\",\"type\":\"string\"},\"expression\":{\"description\":\"Condition expression\",\"type\":\"string\"},\"executor\":{\"description\":\"Type of executor\",\"type\":\"string\",\"enum\":[\"xpath\",\"jsonpath\"]}},\"required\":[\"executor\",\"expression\"]}",
  "multipleInput": false,
  "outputParam": [
    "ifConditionResult"
  ]
}
```

### sch-validator

Validates input data using a Schematron schema.

```json
{
  "type": "sch-validator",
  "configSchema": "{\"$schema\":\"http://json-schema.org/draft-07/schema\",\"additionalProperties\":false,\"title\":\"Schematron Validator\",\"type\":\"object\",\"properties\":{\"inputFilename\":{\"description\":\"Input filename\",\"type\":\"string\"},\"sch\":{\"description\":\"SCH file or URL\",\"type\":\"string\"}},\"required\":[\"sch\"]}",
  "multipleInput": false,
  "outputParam": []
}
```
