marshmallow
marshmallow copied to clipboard
Add "raise_exception" to Schema.validate()
Hi!
I would like to have raise_exception parameter in Schema.validate() like it is in Django REST Framework:
https://www.django-rest-framework.org/api-guide/exceptions/#validationerror
Because now I have to call load to have the error.
Thanks!
For your use case, is there an issue with using load?
I'd rather not add API surface if the common use case is met by existing API.
For your use case, is there an issue with using load?
There could be if load has side-effects, like instantiating, or even writing stuff to DB (which might be an anti-pattern in the first place).