marshmallow-code / marshmallow-code/marshmallow
Add "raise_exception" to Schema.validate()
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 7.2k
- Forks
- 738
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 7
Description
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!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the Schema.validate() and load() entry points to understand their current validation and error behavior. Define how the raise_exception parameter should affect validate(), then add coverage for both its enabled and default behavior; done means validation can raise the error without requiring a separate load() call.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100