Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/pydantic/pydantic
/ MyModel
Class
MyModel
tests/test_validators.py:874–880 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
872
873
def
test_validate_all():
874
class
MyModel(BaseModel):
875
x: int
876
877
@field_validator(
'*'
)
878
@classmethod
879
def
validate_all(cls, v: Any):
880
return
v * 2
881
882
assert MyModel(x=10).x == 20
883
Callers
7
test_validate_all
Function · 0.70
test_custom_type_field_name_model
Function · 0.70
test_custom_type_field_name_model_nested
Function · 0.70
test_after_validator_field_name
Function · 0.70
test_before_validator_field_name
Function · 0.70
test_plain_validator_field_name
Function · 0.70
test_wrap_validator_field_name
Function · 0.70
Calls
4
AfterValidator
Class · 0.90
BeforeValidator
Class · 0.90
PlainValidator
Class · 0.90
WrapValidator
Class · 0.90
Tested by
7
test_validate_all
Function · 0.56
test_custom_type_field_name_model
Function · 0.56
test_custom_type_field_name_model_nested
Function · 0.56
test_after_validator_field_name
Function · 0.56
test_before_validator_field_name
Function · 0.56
test_plain_validator_field_name
Function · 0.56
test_wrap_validator_field_name
Function · 0.56