commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Laurent Vanzeune" <laurent.vanze...@s1.com>
Subject Commons-Validator: locale-independent and locale-dependent validations
Date Fri, 20 Dec 2002 09:56:51 GMT

For some attributes of form beans, I need to define locale-dependent and
locale-independent validations and I don't want to copy paste
locale-independent validations in each locale-dependent formset sections.

I tried with the XML below, but only the validations that match my locale
settings are taken into account.

Is there another way to achieve this?

Thanks,
Laurent.

<form-validation>
	<formset>
		<form name="dataUnitIdForm">
			<field property="fiId" depends="required">
				<arg0 key="dataUnitIdForm.fiId"/>
			</field>
			<field property="feedDate" depends="required">
				<arg0 key="dataUnitIdForm.feedDate"/>
			</field>
		</form>
	</formset>
	<formset language="fr" country="BE">
		<form name="dataUnitIdForm">
			<field property="feedDate" depends="date">
				<var>
                       			<var-name>datePatternStrict</var-name>
                       			<var-value>dd/MM/yyyy</var-value>
                     		</var>
              		</field>
		</form>
	</formset>
	<formset language="en" country="US">
		<form name="dataUnitIdForm">
			<field property="feedDate" depends="date">
				<var>
                       			<var-name>datePatternStrict</var-name>
                       			<var-value>MM/dd/yyyy</var-value>
                     		</var>
              		</field>
		</form>
	</formset>
</form-validation>


Mime
View raw message