You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2002/10/24 17:30:21 UTC
DO NOT REPLY [Bug 13932] New: -
Cannot use same name for field and validator, validator is never invoked
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13932>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13932
Cannot use same name for field and validator, validator is never invoked
Summary: Cannot use same name for field and validator, validator
is never invoked
Product: Commons
Version: unspecified
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: Other
Component: Validator
AssignedTo: commons-dev@jakarta.apache.org
ReportedBy: padma.ginnaram@s1.com
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());
}
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>