cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Markus Heussen" <heus...@rheinland-online.com>
Subject [Woody] Help needed doing date validation
Date Thu, 18 Dec 2003 10:01:01 GMT
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


Mime
View raw message