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

Improve diagnostics in validation error messages #155

Open
alexander-yevsyukov opened this issue Nov 9, 2024 · 0 comments
Open

Improve diagnostics in validation error messages #155

alexander-yevsyukov opened this issue Nov 9, 2024 · 0 comments

Comments

@alexander-yevsyukov
Copy link
Collaborator

alexander-yevsyukov commented Nov 9, 2024

We need to review the error messages that are set as default by Policy classes in the validation module. An error message in its default syntax should be more helpful and tell not only about the fact and nature of the error, but give:

  1. A field name or a combination of fields that are in error. Message-wide validation options like required_field may involve more than one field.
  2. A value of a field or a combination of values that produce an error. Now some policies, like PatternPolicy simply say "String should match regex.". Which string? I what field? Which regex? We need to be more helpful in cases like this.
@alexander-yevsyukov alexander-yevsyukov moved this to 📋 Backlog in v2.0 Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant