Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 3.0 GA, 3.0.1
    • Fix Version/s: 3.1 M2
    • Component/s: Web
    • Labels:
      None
    • Last commented by a User:
      false

      Description

      JSR 303 validation is not supported for REST methods. It would be nice if you could annotate a controller method with @Valid. This would validate the @RequestBody parameter and return 400 (bad request). If the resulting model contains invalid objects a 500 (internal server error) should be returned.

      see http://blog.newsplore.com/2010/02/23/spring-mvc-3-0-rest-rebuttal "JSR 303 bean validation not applied in @Controllers"

        Activity

        Hide
        scottyfred Scott Frederick added a comment -

        This looks like a dup of SPR-6709.

        Show
        scottyfred Scott Frederick added a comment - This looks like a dup of SPR-6709 .
        Hide
        rstoya05-aop Rossen Stoyanchev added a comment -

        A RequestBodyNotValidException is raised and a 400 error returned as a result of validation errors. A summary of the errors is included in the response error message. See DefaultHandlerExceptionResolver for details.

        Show
        rstoya05-aop Rossen Stoyanchev added a comment - A RequestBodyNotValidException is raised and a 400 error returned as a result of validation errors. A summary of the errors is included in the response error message. See DefaultHandlerExceptionResolver for details.

          People

          • Assignee:
            rstoya05-aop Rossen Stoyanchev
            Reporter:
            eberhardwolff Eberhard Wolff
            Last updater:
            Trevor Marshall
          • Votes:
            7 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Days since last comment:
              5 years, 50 weeks, 6 days ago