> ## Documentation Index
> Fetch the complete documentation index at: https://docs.threadify.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Validation Results

> Query contract violations

### Getting Validations

<CodeGroup>
  ```javascript JavaScript theme={null}
  const validations = await thread.validationResults({ limit: 10 });
  ```

  ```go Go theme={null}
  validations, err := thread.ValidationResults(ctx, 10)
  if err != nil {
      log.Fatal(err)
  }
  ```

  ```python Python theme={null}
  validations = await archived_thread.validation_results(limit=10)
  ```
</CodeGroup>

### Query Options

| Option     | Type   | Description                   |
| ---------- | ------ | ----------------------------- |
| `stepName` | string | Filter by step                |
| `severity` | string | `critical`, `warning`, `info` |
| `status`   | string | `violated`, `passed`          |
| `limit`    | number | Max results                   |

### Validation Properties

| Property        | Type   | Description                   |
| --------------- | ------ | ----------------------------- |
| `stepId`        | string | Step ID                       |
| `stepName`      | string | Step name                     |
| `status`        | string | `violated` or `passed`        |
| `severity`      | string | `critical`, `warning`, `info` |
| `message`       | string | Human-readable message        |
| `violationType` | string | Type of violation             |
| `timestamp`     | string | ISO timestamp                 |

### Violation Types

| Type                     | Severity |
| ------------------------ | -------- |
| `invalid_entry_point`    | Critical |
| `missing_required_field` | Critical |
| `invalid_transition`     | Critical |
| `step_timeout`           | Critical |
| `thread_max_duration`    | Critical |
| `retry_limit_exceeded`   | Critical |

### Next Steps

<CardGroup cols={2}>
  <Card title="Working with Contracts" icon="file-contract" href="/core-concepts/working-with-contracts">
    Understand contract validation
  </Card>

  <Card title="Creating a Contract" icon="pen" href="/core-concepts/creating-contracts">
    Define validation rules
  </Card>
</CardGroup>
