struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andy Schmidgall" <>
Subject Validator datePattern difficulties
Date Mon, 01 Dec 2003 17:15:39 GMT

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"
                <arg1 key="${var:datePatternStrict}" resource="false"/>

If I switch to datePattern (rather than datePatternStrict) it lets
anything at all through! That's definitely not what I want either.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message