On Tuesday, September 3, 2002, 5:45:57 PM, Axel Stahlhut wrote:
AS> This is my validation-rules.xml:
AS> <validator name="date"
AS> classname="org.apache.struts.util.StrutsValidator"
AS> method="validateDate"
AS> methodParams="java.lang.Object,
AS> org.apache.commons.validator.ValidatorAction,
AS> org.apache.commons.validator.Field,
AS> org.apache.struts.action.ActionErrors,
AS> javax.servlet.http.HttpServletRequest"
AS> msg="errors.date"
AS> jsFunctionName="DateValidations">
AS> and the validation.xml:
AS> <field property="beginEmployment" depends="date">
AS> <arg0 key="personal.data.beginEmployment" />
AS> <var>
AS> <var-name>datePattern</var-name>
AS> <var-value>dd.MM.yyyy</var-value>
AS> </var>
AS> </field>
I think you need the depends="required" in the validation-rules
for date. You don't want it in the validation.xml but in the rule
I think you might need it to get it to work correctly. I have the
depends="required" in the validation-rules.xml for date and my
dates are getting validated if I leave the field blank, so give it
a try. Not positive that's the problem though.
--
Rick
mailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>