Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-6380

Support for javax.validation annotations on @PathVariable, @RequestHeader, @RequestParam

    Details

    • Type: New Feature
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.0 RC2, 4.0.5
    • Fix Version/s: 5.x Backlog
    • Component/s: Web
    • Labels:
    • Last commented by a User:
      false

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                juergen.hoeller Juergen Hoeller
                Reporter:
                gbrehmer Gerrit Brehmer
                Last updater:
                Sam Brannen
              • Votes:
                67 Vote for this issue
                Watchers:
                72 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Days since last comment:
                  1 year, 12 weeks, 1 day ago