Skip to main content

ValLineError

This class represents a validation error associated with a specific line or location in the input data. It encapsulates the type of error encountered, the reversed location path for efficient processing, and the original input value that triggered the failure.

Attributes

AttributeTypeDescription
error_typeErrorTypeThe specific category or classification of the validation error encountered.
location[Location](../../location/location.md?sid=errors_location_location)A reversed sequence of path elements identifying where the error occurred, optimized for efficient appending of outer context.
input_value[InputValue](inputvalue.md?sid=errors_line_error_inputvalue)The original data value that failed validation and triggered the error.

Constructor

Signature

def ValLineError(
error_type: ErrorType,
location: [Location](../../location/location.md?sid=errors_location_location),
input_value: [InputValue](inputvalue.md?sid=errors_line_error_inputvalue)
) - > null

Parameters

NameTypeDescription
error_typeErrorTypeThe specific type of error that occurred.
location[Location](../../location/location.md?sid=errors_location_location)The location of the error, stored in reverse order for efficient updates.
input_value[InputValue](inputvalue.md?sid=errors_line_error_inputvalue)The value that caused the validation error.

Methods


error_type()

def error_type() - > ErrorType

The specific type of validation error encountered, identifying which constraint or rule was violated.

Returns

TypeDescription
ErrorTypeAn ErrorType enum or object representing the specific validation failure category.

location()

def location() - > [Location](../../location/location.md?sid=errors_location_location)

The path to the specific field or index where the error occurred, stored in reverse order for efficient processing.

Returns

TypeDescription
[Location](../../location/location.md?sid=errors_location_location)A Location object containing the sequence of keys or indices leading to the error source.

input_value()

def input_value() - > [InputValue](inputvalue.md?sid=errors_line_error_inputvalue)

The original data value that failed validation, preserved for debugging and error reporting.

Returns

TypeDescription
[InputValue](inputvalue.md?sid=errors_line_error_inputvalue)The raw input data that was being validated when the error was triggered.