All docs
Errors·
error
Errors.ValidationError
records one parameter validation failure — its name, message, and value
Python
ValidationError(parameter: str, message: str, value: Any)
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 · Errors · Tool
Guides: Params & actions
By LSD Team · Last updated Jul 18, 2026
Ask on Discord
View as Markdown