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

Constraints error messages customization #230

Closed
wyfo opened this issue Oct 31, 2021 · 1 comment · Fixed by #235
Closed

Constraints error messages customization #230

wyfo opened this issue Oct 31, 2021 · 1 comment · Fixed by #235
Assignees
Labels
enhancement New feature or request

Comments

@wyfo
Copy link
Owner

wyfo commented Oct 31, 2021

Currently, validation errors resulting of JSON schema constraints doesn't include the invalid data. This is a design choice, as it's more secure. However, not everybody does care about this level of security, and having data directly in the error message could be convenient.

By the way, even without these security concerns, error message customization is nice to have, as long as it's kept simple.

@wyfo wyfo added the enhancement New feature or request label Oct 31, 2021
@wyfo wyfo self-assigned this Oct 31, 2021
@wyfo
Copy link
Owner Author

wyfo commented Oct 31, 2021

Will be resolved as a side effect of #235.

Error messages can be customized using settings.errors attributes. Message are formatted using str.format according to parameters that will be described in the documentation.

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

Successfully merging a pull request may close this issue.

1 participant