-
-
Notifications
You must be signed in to change notification settings - Fork 620
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
Validation does not occur on serialization documentation issue #2189
Labels
Comments
If you can't guarantee that data being https://marshmallow.readthedocs.io/en/stable/quickstart.html#deserializing-objects-loading |
Yes this is possible but is not the "alternative" according to docs. Better way would be do to validate() instead of load(). It says validate before dumping to get the same behaviour. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Base on the documentation that validation does not occur on serialisation anymore https://marshmallow.readthedocs.io/en/stable/upgrading.html.
There is example how to workaround. However this alternative is flawed since it does not work if you use data_key on created_at (like camlcase).
Another case that does not work is if you actually pass a correct value (like current datetime).
Is there any alternative that takes data_key into account?
I think documentation would need to be updated to reflect that use case.
Another case that does not work:
The text was updated successfully, but these errors were encountered: