Daniyar Kussainov

Results 2 comments of Daniyar Kussainov

It would be great to see this feature! An alternative [ODMantic](https://github.com/art049/odmantic) support both sync (pymongo) and async (motor) engines.

> common cases. see: https://pydantic-docs.helpmanual.io/usage/validators/#validate-always ```python class User(Model): username: str = Field(index=True) created: datetime = Field(default_factory=datetime.now) modified: datetime = Field(default_factory=datetime.now) @validator("modified", always=True, pre=True) def auto_now(cls, value): return datetime.now() ``` Same