Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
1.2.8
-
None
-
None
-
Operating System: other
Platform: All
-
37578
Description
in my current project i have forms, which need multiple form-validation
depending on the users input. since in the present implementation i can only
validate the form with one validator-key i suggest to add a new actionform-
method which allows to run a validation with a given validator-key provided by
the application. heres my implementation:
public class DynaValidatorWithFormKeyForm extends DynaValidatorForm {
...
public ActionErrors validate(String validationKey, ActionMapping mapping,
HttpServletRequest request) {
if (log.isDebugEnabled())
log.debug("executing validate()");
final ServletContext application = getServlet().getServletContext();
final ActionErrors errors = new ActionErrors();
final Validator validator = Resources.initValidator(validationKey,
this, application, request, errors, page);
try
catch (ValidatorException e)
{ log.error(e.getMessage(), e); } return errors;
}
}
this allows me to run different validations on one form...
regards
chris