-   Notifications  
You must be signed in to change notification settings  - Fork 41.6k
 
Closed as not planned
Closed as not planned
Copy link
Labels
status: supersededAn issue that has been superseded by anotherAn issue that has been superseded by another
Description
GH-39865 added support for MethodValidationResult to DefaultErrorAttributes but it filters the list errors published in the result and used for counting to instances of ObjectError.
With a method signature (in a RestController) of e.g. public void method(@PathVariable @Pattern(regexp = "^a.*") String parameter), this results in
message = "Validation failed for method='public void <class>.method(java.lang.String)'. Error count: 0"errors = []
This is due to the fact, that the MethodValidationResult generated by MethodValidationAdapter will contain instances of ParameterValidationResult that have resolvable errors of type DefaultMessageSourceResolvable (and not ObjectError).
Spring Boot 3.3.1
 Spring Framework 6.1.10
rupert-madden-abbott and injae-kim
Metadata
Metadata
Assignees
Labels
status: supersededAn issue that has been superseded by anotherAn issue that has been superseded by another