New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support JSR 303 for REST [SPR-6928] #11593

Closed
spring-issuemaster opened this Issue Mar 3, 2010 · 2 comments

Comments

Projects
None yet
2 participants
@spring-issuemaster
Copy link
Collaborator

spring-issuemaster commented Mar 3, 2010

Eberhard Wolff opened SPR-6928 and commented

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"


Affects: 3.0 GA, 3.0.1

7 votes, 6 watchers

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator

spring-issuemaster commented Mar 15, 2010

Scott Frederick commented

This looks like a dup of #11375.

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator

spring-issuemaster commented Jun 8, 2011

Rossen Stoyanchev commented

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment