Skip to main content

WrapValidator

A metadata class that indicates that a validation should be applied around the inner validation logic.

Attributes

AttributeTypeDescription
func`core_schema.NoInfoWrapValidatorFunctioncore_schema.WithInfoWrapValidatorFunction`
json_schema_input_typeAny = PydanticUndefinedThe input type used to generate the appropriate JSON Schema (in validation mode).

Constructor

Signature

def WrapValidator(
func: core_schema.NoInfoWrapValidatorFunction | core_schema.WithInfoWrapValidatorFunction,
json_schema_input_type: Any = PydanticUndefined
)

Parameters

NameTypeDescription
func`core_schema.NoInfoWrapValidatorFunctioncore_schema.WithInfoWrapValidatorFunction`
json_schema_input_typeAny = PydanticUndefinedThe input type used to generate the appropriate JSON Schema.