- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for lower_username (0.07 sec)
-
tests/test_filter_pydantic_sub_model/app_pv1.py
username: str class ModelC(ModelB): password: str class ModelA(BaseModel): name: str description: Optional[str] = None model_b: ModelB @validator("name") def lower_username(cls, name: str, values): if not name.endswith("A"): raise ValueError("name must end in A") return name async def get_model_c() -> ModelC:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 784 bytes - Viewed (0) -
tests/test_filter_pydantic_sub_model_pv2.py
class ModelC(ModelB): password: str class ModelA(BaseModel): name: str description: Optional[str] = None foo: ModelB @field_validator("name") def lower_username(cls, name: str, info: ValidationInfo): if not name.endswith("A"): raise ValueError("name must end in A") return name async def get_model_c() -> ModelC:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 6.3K bytes - Viewed (0)