-
Notifications
You must be signed in to change notification settings - Fork 38.4k
Document that any @Valid*
annotation triggers validation in the reference manual
#27050
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
Comments
The annotaion which is name "Valid" was already definated, you can check for javax.validation.Valid. |
In my opinion, "valid" is just a name. I can use this annotation to validate parameters and do other things. Spring should not use a name to determine its logic. Is there anything special about this name in some rules? |
Yes, this convention has been in place for a long time. See #17256 (comment) for an explanation of why the convention will remain in place. In light of the above, I am repurposing this issue to improve the documentation in the reference manual which currently only highlights support for |
@Valid*
annotation triggers validation in the reference manual
Will you consider removing this later? |
Thanks for yoyr answer |
Affects: Spring Framework 4.1.5
spring-framework/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/AbstractMessageConverterMethodArgumentResolver.java
Line 240 in 20d9a1e
AbstractMessageConverterMethodArgumentResolver#validateIfApplicable
I'm trying to custom an annotation whose name is "Valid", but this method makes my custom annotation can not work as I expected.
The text was updated successfully, but these errors were encountered: