CustomErrorValidator
No overview available.
Attributes
| Attribute | Type | Description |
|---|---|---|
| validator | Arc< CombinedValidator > | The underlying combined validator instance used to perform the core validation logic. |
| custom_error | [CustomError](customerror.md?sid=validators_custom_error_customerror) | The specific error definition to be returned when the validation process fails. |
| name | String | The identifier string used to represent this specific validator instance within the system. |
Constructor
Signature
def CustomErrorValidator(
validator: Arc< CombinedValidator >,
custom_error: [CustomError](customerror.md?sid=validators_custom_error_customerror),
name: String
) - > [CustomErrorValidator](customerrorvalidator.md?sid=validators_custom_error_customerrorvalidator)
Parameters
| Name | Type | Description |
|---|---|---|
| validator | Arc< CombinedValidator > | The underlying validator to be wrapped. |
| custom_error | [CustomError](customerror.md?sid=validators_custom_error_customerror) | The custom error details to be returned when validation fails. |
| name | String | The name associated with this validator instance. |
Signature
@staticmethod
def new(
validator: Arc< CombinedValidator >,
custom_error: [CustomError](customerror.md?sid=validators_custom_error_customerror),
name: String
) - > [CustomErrorValidator](customerrorvalidator.md?sid=validators_custom_error_customerrorvalidator)
Parameters
| Name | Type | Description |
|---|---|---|
| validator | Arc< CombinedValidator > | The underlying validation logic to be executed. |
| custom_error | [CustomError](customerror.md?sid=validators_custom_error_customerror) | The specific error structure to return if the validation fails. |
| name | String | A unique identifier or label for this validator instance used in reporting. |