commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric.Le...@swissinfo.ch
Subject [Validator] Requiredif with another validator
Date Mon, 29 Mar 2004 16:00:58 GMT
Hi

I'm testing the requiredif and I have the following definitions:

			<field property="startDate" depends="date">
				<arg0 key="label.startDate.title"
resource="true"/>
				<var>
	
<var-name>datePatternStrict</var-name>
					<var-value>dd.MM.yyyy
HH:mm:ss</var-value>
				</var>
			</field>
			<field property="endDate" depends="requiredif,date">
				<arg0 key="label.endDate.title"
resource="true"/>
				<var>
					<var-name>field[0]</var-name>
					<var-value>startDate</var-value>
				</var>
				<var>
					<var-name>fieldTest[0]</var-name>
					<var-value>NOTNULL</var-value>
				</var>
				<var>
	
<var-name>datePatternStrict</var-name>
					<var-value>dd.MM.yyyy
HH:mm:ss</var-value>
				</var>
			</field>

This works all well, but if I set both fields startDate and endDate to null,
it fails. Specifically, the first field validator fails. IMHO since
startDate is not "required" and endDate is "requiredif" startDate exists, it
should work. Are the definitions wrong or am I wrong about how requiredif
works?

Eric


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message