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

To customize the error message for required fields, pass a dict with a required key as the error_messages argument for the field. #1985

Open
Tridagger opened this issue May 5, 2022 · 1 comment

Comments

@Tridagger
Copy link

image
image
image

@deckar01
Copy link
Member

278ff69#diff-c9a9d6773bfb8f6a209256e8f1dc00db3eca97be188d9541607f55ca4f9744d1R248

5a933dc#diff-0cddc4aac0e4e16946830a5807c264d65b7f14a2a1b1cb23b03028a36df3681aR156

The type annotations did not match the docs when they were added. I suspect we want to use the same type signature that ValidationError accepts for the message arg. I suspect there are enough args that end up getting passed to ValidationError that we should consider making a type alias for this.

https://github.com/marshmallow-code/marshmallow/blob/6c4a423/src/marshmallow/exceptions.py#L30

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

No branches or pull requests

2 participants