Hello,

I would like to use Struts validator to validate my form fields that are
date formatted BUT are not mandatory.

I tried this :
<field property="date"
            depends="date">
            <arg0 key="myForm.date"/>
            <var>
              <var-name>datePatternStrict</var-name>
              <var-value>dd/MM/yyyy</var-value>
            </var>
</field>

... but it validates my date field even if it is left blank, and so I get
the [errors.date] message.

I use a pattern to validate this date formatted, possibly blank fields. Do
you know a way to make date validation for not-mandatory fields ?

Nicolas De Loof


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>

Reply via email to