Skip to content

Support for javax.validation annotations on @PathVariable, @RequestHeader, @RequestParam [SPR-6380] #11041

Closed
@spring-projects-issues

Description

@spring-projects-issues

Gerrit Brehmer opened SPR-6380 and commented

I thought this was already done, because support for controller method-parameter validation should be available for all parameters.

I there a reason to exclude annotated (@RequestParam, etc.) method parameters? Is it not possible to validate primitive values?

Simple example:
For Paging-Support i need two request parameters: "start" & "size". "start" must have a positive value or 0 and "size" must have a positive value and also a maximum set.


Affects: 3.0 RC2, 4.0.5

Issue Links:

75 votes, 80 watchers

Metadata

Metadata

Assignees

No one assigned

    Labels

    has: votes-jiraIssues migrated from JIRA with more than 10 votes at the time of importin: 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