# Errors.ValidationError
URL: https://lsd.tools/docs/api-errors-validationerror
Updated: 2026-07-18

## Parameters

| name | type | default | description |
|---|---|---|---|
| `parameter` | `str` | — | name of the parameter that failed its check |
| `message` | `str` | — | human-readable reason the value was rejected |
| `value` | `Any` | — | the offending value that failed validation |

## Example

```python
from lsdtools import ValidationError

result = step.validate()          # → a ValidationResult
if not result:                    # falsy when there are errors
    for err in result.errors:     # each item is a ValidationError
        print(err.parameter, err.message, err.value)
```

Build one directly:

```python
ValidationError(parameter="cutoff", message="must be ≥ 0", value=-3)
```

## Notes

This is a **dataclass** record — fields `parameter`, `message`, `value` — **not** an exception
subclass. It describes *one* parameter validation failure and is collected into the `errors` list of
a `ValidationResult`, so you inspect `result.errors`; you do **not** `except ValidationError`. It is a
run-time value, produced when a `Configurable`'s parameter fails its declared check (range, choices,
type, …).

## See also

**API:** [SchemaError](/docs/api-errors-schemaerror) · [Errors](/docs/api-errors) · [Tool](/docs/api-tool)

**Guides:** [Params & actions](/docs/ui-panels)
