usage in validation.xml:

<field property="fooDate" depends="required,date">
        <arg0 key="fooForm.fooDate"/>
        <var>
           <var-name>datePattern</var-name>
           <var-value>MM/dd/yyyy</var-value> <!-- or a locale ... ;-)
-->
       </var>
</field>

API of Validator-Framework said (FieldChecks.validateDate() of
org.apache.struts.validator-package):
Checks if the field is a valid date. If the field has a datePattern
variable, that will be used to format java.text.SimpleDateFormat. If the
field has a datePatternStrict variable, that will be used to format
java.text.SimpleDateFormat  and the length will be checked so
'2/12/1999' will not pass validation with the format 'MM/dd/yyyy'
because the month isn't two digits. If no datePattern variable is
specified, then the field gets the DateFormat.SHORT format for the
locale. The setLenient method is set to false for all variations.

JavaDoc für DateFormat.SHORT said:
SHORT is completely numeric, such as 12.13.52 or 3:30pm

cheers,

> -----Original Message-----
> From: Tim Penhey [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, June 03, 2004 9:37 AM
> To: Struts Users Mailing List
> Subject: Dynamic validation and dates
> 
> 
> Does the DynaValidatorForm handle java.util.Date?  
> If it does, how does it handle I18N for input?
> 
> Thanks,
> Tim
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to