2. Date validation. I need be sure a date follows a particular formatIntake can do this but you need the latest patches from CVS. Check out the TURBINE_2_3_BRANCH branch and build turbine-2.3.1-dev.jar.
(mm/dd/yyyy), and I need to be sure that the day indicated is
permissable for the given month (i.e.: 02/31/1922 is NOT valid). The
format validation is easily done via Intake. The DateValidator in the
commons library seems to only do format validation. Obviously this sort
of validation can be done via the GregorianCalendar class, but I'm
wondering if a package exists to do this sort of validation (as I don't
want to re-invent the wheel).
To reject dates such as 02/31/1992 you need to have a flexible rule thus:
<field name="YourDate" key="ydate" type="DateString">
<rule name="required" value="true">Please enter a date.</rule>
<rule name="format" value="MM/dd/yyyy">Please enter a sensible date ("mm/dd/yyyy").</rule>
<rule name="format1" value="MM/dd/yy">Please enter a sensible date ("mm/dd/yyyy").</rule>
<rule name="flexible" value="false"/>
</field>
Scott
-- Scott Eade Backstage Technologies Pty. Ltd. http://www.backstagetech.com.au
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
