You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Moore, Scott R." <MO...@SEC.GOV> on 2003/04/03 19:54:14 UTC
Custom validation method that returns multiple error messages
Hi all,
I'm using a custom validation method to enforce three rules regarding
passwords. I would like to be able to display up to three error messages,
but at first glance, the format required for the <validator> tag in my
custom-validator-rules.xml file only permits one error message:
<!-- Validator for ensuring a password does not contain all or part of
user name -->
<validator name="enforceSecurePassword"
classname="gov.sec.lib.validation.Validation"
method="enforceSecurePassword"
methodParams="java.lang.Object,
org.apache.commons.validator.ValidatorAction,
org.apache.commons.validator.Field,
org.apache.struts.action.ActionErrors,
javax.servlet.http.HttpServletRequest,
javax.servlet.ServletContext"
msg="errors.password"/>
Anybody know if there is a way around this? Or do I have to have separate
custom validation methods to enforce each rule?
Thanks,
Scott Moore
mooresc@sec.gov
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org