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

Dumps ignores strict for pre_dump/post_dump errors #521

Closed
tvuotila opened this Issue Sep 7, 2016 · 0 comments

Comments

Projects
None yet
2 participants
@tvuotila
Contributor

tvuotila commented Sep 7, 2016

After #489 following code does not raise:

from marshmallow import Schema, pre_dump, ValidationError

class ExampleSchema(Schema):
    @pre_dump
    def pre_dump_error(self, item):
        errors = {
          'foo' : ['error',]
        }
        raise ValidationError(errors)

schema = ExampleSchema(strict=True)
schema.dumps(object())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment