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

Include default_error_messages for field classes #1619

Merged
merged 3 commits into from Jun 28, 2020
Merged

Include default_error_messages for field classes #1619

merged 3 commits into from Jun 28, 2020

Conversation

weeix
Copy link
Contributor

@weeix weeix commented Jun 23, 2020

As a newbie who was finding a way to replace 'Not a valid email address.' with a custom error message and tried guessing the correct dict key like 'validator_failed', 'Email', 'email' (the correct one is 'invalid').

I think it would be great to include default_error_messages for each field classes in the API Reference.

As a newbie who was finding a way to replace 'Not a valid email address.' with a custom error message and tried guessing the correct dict key like 'validator_failed', 'Email', 'email' (the correct one is 'invalid').

I think it would be great to include `default_error_messages` for each field classes in the API Reference.
@sloria
Copy link
Member

sloria commented Jun 23, 2020

Thanks for the PR! Good idea to include this. Is it actually necessary to document it on every field, or does it suffice to do it on Field only?

@weeix
Copy link
Contributor Author

weeix commented Jun 23, 2020 via email

@sloria sloria merged commit cee3e4e into marshmallow-code:dev Jun 28, 2020
@sloria
Copy link
Member

sloria commented Jun 28, 2020

Right, I forgot we don't use :inherited-members: for field classes. Fixed up and merged.

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

Successfully merging this pull request may close these issues.

None yet

2 participants