Skip to main content

PlainValidator

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

Attributes

AttributeTypeDescription
func`core_schema.NoInfoValidatorFunctioncore_schema.WithInfoValidatorFunction`
json_schema_input_typeAny = AnyThe input type used to generate the appropriate JSON Schema (in validation mode).

Constructor

Signature

def PlainValidator(
func: core_schema.NoInfoValidatorFunction | core_schema.WithInfoValidatorFunction,
json_schema_input_type: Any = Any
)

Parameters

NameTypeDescription
func`core_schema.NoInfoValidatorFunctioncore_schema.WithInfoValidatorFunction`
json_schema_input_typeAny = AnyThe input type used to generate the appropriate JSON Schema in validation mode.