You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Markus Heussen <he...@rheinland-online.com> on 2003/12/18 11:01:01 UTC
[Woody] Help needed doing date validation
How can I validate a date within the form definition file?
I need to check if the date is given in the right format (dd.MM.yyyy) and if
the date is valid.
I have something like this:
source:
<v:Geburtsdatum>1973-11-16</v:Geburtsdatum>
definition:
<wd:field id="vn_geburtsdatum" required="true">
<wd:label>Geburtsdatum</wd:label>
<wd:datatype base="date">
<wd:convertor>
<wd:patterns>
<wd:pattern>dd.MM.yyyy</wd:pattern>
</wd:patterns>
</wd:convertor>
</wd:datatype>
</wd:field>
binding:
<wb:value id="vn_geburtsdatum" path="v:Geburtsdatum">
<wd:convertor datatype="date" type="formatting">
<wd:patterns>
<wd:pattern>yyyy-MM-dd</wd:pattern>
</wd:patterns>
</wd:convertor>
</wb:value>
Thanks for your help!
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org