BeforeValidator
A metadata class that indicates that a validation should be applied before the inner validation logic.
Attributes
| Attribute | Type | Description |
|---|---|---|
| func | `core_schema.NoInfoValidatorFunction | core_schema.WithInfoValidatorFunction` |
| json_schema_input_type | Any = PydanticUndefined | The input type used to generate the appropriate JSON Schema (in validation mode). |
Constructor
Signature
def BeforeValidator(
func: core_schema.NoInfoValidatorFunction | core_schema.WithInfoValidatorFunction,
json_schema_input_type: Any = PydanticUndefined
) - > null
Parameters
| Name | Type | Description |
|---|---|---|
| func | `core_schema.NoInfoValidatorFunction | core_schema.WithInfoValidatorFunction` |
| json_schema_input_type | Any = PydanticUndefined | The input type used to generate the appropriate JSON Schema. |