Skip to content

Validate values in top-level Map parameters [SPR-14615] #19182

Closed as not planned
@spring-projects-issues

Description

@spring-projects-issues

Martin Asenov opened SPR-14615 and commented

Class with RestController annotation
Method with RequestMapping annotation, method is POST
Map<String, CustomDto> is a parameter, annotated with @Valid and @RequestBody
CustomDto has @NotNull on one of its fields.
The input passes even though a CustomDto entry is not valid (null value on the @NotNull field)
When I try to change the Map with a single CustomDto, it is validated correctly, but when a map, it is not.


Affects: 4.2.5

Issue Links:

1 votes, 3 watchers

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: webIssues in web modules (web, webmvc, webflux, websocket)status: supersededAn issue that has been superseded by anothertype: enhancementA general enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions