mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-07-14 06:13:30 +00:00
Ensure that classes implementing the BindBeforeValidation interface have the method called *before* validation, as Validator implementations will sometimes check the properties modified by BindBeforeValidation implementations.
This commit is contained in:
parent
c5e060dc09
commit
ebb99abc78
@ -135,13 +135,13 @@ public class ValidationManagerImpl implements InitializingBean,
|
|||||||
Class clazz = currentDomainObject.getClass();
|
Class clazz = currentDomainObject.getClass();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
// Call bindSupport() if this class wishes
|
||||||
|
BindBeforeValidationUtils.bindIfRequired(currentDomainObject);
|
||||||
|
|
||||||
Errors errors = new BindException(currentDomainObject,
|
Errors errors = new BindException(currentDomainObject,
|
||||||
clazz.getName());
|
clazz.getName());
|
||||||
Validator v = findValidator(clazz);
|
Validator v = findValidator(clazz);
|
||||||
|
|
||||||
// Call bindSupport() if this class wishes
|
|
||||||
BindBeforeValidationUtils.bindIfRequired(currentDomainObject);
|
|
||||||
|
|
||||||
// Perform validation
|
// Perform validation
|
||||||
v.validate(currentDomainObject, errors);
|
v.validate(currentDomainObject, errors);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user