Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
None
-
Operating System: other
Platform: Other
-
13932
Description
Cannot use same name for field and validator, validator is never invoked.
The bug is in Validator.validateFieldForRule
if (results.getValidatorResult(va.getName()) != null)
{ return isValid(results.getValidatorResult(va.getName())); }ValidatorResults.getValidatorResult expects a field key not the validator name.
Here is the fix:
if (results.getValidatorResult(field.getKey()) != null)
{ ValidatorResult result = results.getValidatorResult(field.getKey()); if (result.containsAction(va.getName())) return result.isValid(va.getName()); }