Skip to content

ValidationResult

The outcome of a single validation check.

Attributes:

Name Type Description
is_valid bool

True if validation passed, False otherwise.

message str

Error message when is_valid is False; empty string otherwise.

__init__

__init__(is_valid: bool, message: str = '')

Create a validation result.

Parameters:

Name Type Description Default
is_valid bool

True if validation passed.

required
message str

Error message. Defaults to an empty string.

''