WithInfoWrapValidatorFunctionSchema
This class defines a schema for a wrap validator function that receives an additional validation information object. It specifies a required function type and the validator function itself, while maintaining a deprecated field for backward compatibility.
Attributes
| Attribute | Type | Description |
|---|---|---|
| type | Literal['with-info'] | Fixed literal identifier used to distinguish this schema as a 'with-info' validator type. |
| function | WithInfoWrapValidatorFunction | The wrap validator function that receives the value to validate along with a handler and validation info object. |
| field_name | string | Deprecated string identifier previously used to specify the name of the field being validated. |
Methods
type()
def type() - > Literal['with-info']
Specifies the schema type identifier, which must be the literal string 'with-info'.
Returns
| Type | Description |
|---|---|
Literal['with-info'] | The fixed type identifier for this schema definition. |
function()
def function() - > WithInfoWrapValidatorFunction
Defines the validator function that receives the value to validate along with a validation info object.
Returns
| Type | Description |
|---|---|
WithInfoWrapValidatorFunction | The callable function used for the wrap validation logic. |
field_name()
def field_name() - > str
Deprecated field previously used to specify the name of the field being validated.
Returns
| Type | Description |
|---|---|
str | The name of the field associated with this validator. |