Skip to main content

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

AttributeTypeDescription
typeLiteral['with-info']Fixed literal identifier used to distinguish this schema as a 'with-info' validator type.
functionWithInfoWrapValidatorFunctionThe wrap validator function that receives the value to validate along with a handler and validation info object.
field_namestringDeprecated 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

TypeDescription
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

TypeDescription
WithInfoWrapValidatorFunctionThe 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

TypeDescription
strThe name of the field associated with this validator.