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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to