Hello,
For my webapp I need to make sure a date is in the form 'mm/dd/yy', but
I haven't been able to achieve this with the struts validator (I only
need the javascript to work for now). All the examples I can find use
'MM/dd/yyyy' or 'MM-dd-yyyy'. If I switch to one of these and put in a 4
char date, then it validates ok, but I need to validate on the 2 char
date, not 4. Is this doable with the struts validator?
This is my validation definition:
<field property="transactionDateString"
depends="required,date">
<arg0
key="TruckMovementForm.transactionDateString.displayname"/>
<arg1 key="${var:datePatternStrict}" resource="false"/>
<var>
<var-name>datePatternStrict</var-name>
<var-value>MM/dd/yy</var-value>
</var>
</field>
If I switch to datePattern (rather than datePatternStrict) it lets
anything at all through! That's definitely not what I want either.
Thanks,
Andy
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]