def test_model_validator_many_values_change():
    """It should run root_validator on assignment and update ALL concerned fields"""

    class Rectangle(BaseModel):
        width: float
        height: float
        area: Optional[float] = None

        model_config = ConfigDict(validate_assignment=True)

        @model_validator(mode='after')
        def set_area(self) -> 'Rectangle':
            self.__dict__['area'] = self.width * self.height
            return self

    r = Rectangle(width=1, height=1)
    assert r.area == 1
    r.height = 5
    assert r.area == 5
It should run root_validator on assignment and update ALL concerned fields
tests/test_validators.py