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

String fields should return an error when given non-UTF-8 #650

Closed
dan-blanchard opened this Issue Jun 23, 2017 · 3 comments

Comments

Projects
None yet
3 participants
@dan-blanchard

dan-blanchard commented Jun 23, 2017

Currently, if a user specifies a bytes value for a String field that is not UTF-8, marshmallow will raise a UnicodeDecodeError. A more sensible thing to expect from a validation library like marshmallow would be for it to return an error message about this not being a valid UTF-8 String.

@cwisecarver

This comment has been minimized.

cwisecarver commented Oct 23, 2017

@sloria Any thoughts on this? I can make a PR if it will help.

@sloria

This comment has been minimized.

Member

sloria commented Oct 23, 2017

@dan-blanchard @cwisecarver Sorry for the delayed response; this one fell through the cracks. Yes, I think the proposed behavior is correct. I would certainly review and merge a PR for this.

@sloria

This comment has been minimized.

Member

sloria commented Dec 2, 2017

This is fixed in 0.15.0.

@sloria sloria closed this Dec 2, 2017

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