Skip to content
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

"load_only" fields #87

Closed
sloria opened this issue Dec 8, 2014 · 3 comments
Closed

"load_only" fields #87

sloria opened this issue Dec 8, 2014 · 3 comments
Milestone

Comments

@sloria
Copy link
Member

sloria commented Dec 8, 2014

Possible feature: add a Field parameter that would make the field active for validation/deserialization but not appear in serialization output.

This came up in a discussion here: marshmallow-code/flask-marshmallow#5 (comment) (though we used the term "write-only", which is a misnomer).

Related to #61 .

EDIT: Fix URL to comment.

@sloria sloria added this to the 2.0-a milestone Jan 17, 2015
@sloria
Copy link
Member Author

sloria commented Jan 25, 2015

Added in #131

@sloria sloria closed this as completed Jan 25, 2015
@Lacrymology
Copy link

is there a way to have dump_only fields throw an error if they're passed on to load?

@lafrech
Copy link
Member

lafrech commented Sep 30, 2016

@Lacrymology, this could be a sub-use case of the check_unknown_fields example: http://marshmallow.readthedocs.io/en/latest/extending.html#validating-original-input-data

It seems the authors don't see this as a feature that should be in the core, available through a parameter, but leave this to user code (#524).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants