samuelcolvin / pydantic Public
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
validate_assignment does not work with root_validator #1971
Labels
Comments
PrettyWood
added a commit
to PrettyWood/pydantic
that referenced
this issue
Oct 6, 2020
PrettyWood
added a commit
to PrettyWood/pydantic
that referenced
this issue
Oct 6, 2020
4 tasks
|
Hello @caldwellshane I agree with you the behaviour should be the same as a regular validator. |
PrettyWood
added a commit
to PrettyWood/pydantic
that referenced
this issue
Oct 9, 2020
4 tasks
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Output of
python -c "import pydantic.utils; print(pydantic.utils.version_info())":Minimal Example
I'd like to enforce a condition on a whole model during arbitrary changes in its state:
Based on my reading of the docs I'd expect this to fail validation if I set
current_valueabovemax_value, or setmax_valuebelowcurrent_value, on an existing instance. Is that not the intended behavior?Thanks for an excellent library!
The text was updated successfully, but these errors were encountered: