Fallback to BeanPropertyBindingResult for unbound property validation

gh-17424 updated `ValidationBindHandler` so that it would
only look at bound values when validating. This commit updates
`ValidationBindHandler` to use Spring Framework's `BeanPropertyBindingResult`.
This means that for fields that are not bound, JavaBean accessor methods can
be used to get the value to validate.

Fixes gh-25356
This commit is contained in:
Madhura Bhave
2021-03-11 14:13:13 -08:00
parent df97627b21
commit df1d1dbaa9
4 changed files with 88 additions and 9 deletions

View File

@@ -49,4 +49,5 @@
<suppress files="LinuxDomainSocket" checks="FinalClass" message="SockaddrUn" />
<suppress files="BsdDomainSocket" checks="FinalClass" message="SockaddrUn" />
<suppress files="StringSequence" checks="SpringMethodVisibility" message="isEmpty"/>
<suppress files="ValidatorPropertiesWithDefaultValues\.java" checks="SpringMethodVisibility" />
</suppressions>