Skip to content

Conversation

@HeeChanN
Copy link

Added a section explaining that container parameters annotated with @Valid

Added a section explaining that container parameters annotated with `@Valid`

Signed-off-by: Hee Chan <[email protected]>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Jul 11, 2025
@rstoyanchev rstoyanchev self-assigned this Nov 4, 2025
@rstoyanchev rstoyanchev added type: documentation A documentation task in: web Issues in web modules (web, webmvc, webflux, websocket) labels Nov 4, 2025
likewise subject to method validation. They are detected by
`HandlerMethod.MethodValidationInitializer.checkArguments(…)`, and any
resulting constraint violations cause a `HandlerMethodValidationException`
to be raised.
Copy link
Contributor

@rstoyanchev rstoyanchev Nov 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is @RequestBody List<Foo> items really validated? I would expect it needs @Valid.

What is the purpose of having @Valid in both places with @RequestBody @Valid List<@Valid Foo> items? Isn't @RequestBody @Valid List<Foo> items sufficient, or likewise I would expect @RequestBody List<@Valid Foo> items to work. It's unclear why both?

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) status: waiting-for-triage An issue we've not yet triaged or decided on type: documentation A documentation task

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants