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

Update documentation on customizing validation errors with MessageSource #30653

Closed
Tracked by #30645
rstoyanchev opened this issue Jun 13, 2023 · 0 comments
Closed
Tracked by #30645
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: documentation A documentation task
Milestone

Comments

@rstoyanchev
Copy link
Contributor

There is an i18n section, but it's more general, how to customize RFC 7807 error responses for any exception. For validation errors it says:

MethodArgumentNotValidException
{0} the list of global errors, {1} the list of field errors. 
Message codes and arguments for each error within the BindingResult are also resolved via MessageSource.

Validation errors could use dedicated coverage with example error codes and messages to show how to customize the individual errors that are included in arguments {0} abd {1}. The built-int web support for method validation in #30645 will add even more to this with validation errors directly on method parameters (as opposed to on fields in an Object).

@rstoyanchev rstoyanchev added type: documentation A documentation task in: web Issues in web modules (web, webmvc, webflux, websocket) labels Jun 13, 2023
@rstoyanchev rstoyanchev added this to the 6.1.0-M2 milestone Jun 13, 2023
@rstoyanchev rstoyanchev self-assigned this Jun 13, 2023
@rstoyanchev rstoyanchev changed the title Improve documentation on customizing validation errors with MessageSource Update documentation on customizing validation errors with MessageSource Jun 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: documentation A documentation task
Projects
None yet
Development

No branches or pull requests

1 participant