struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Poon, Johnny" <>
Subject validator validwhen not working?
Date Wed, 09 Jul 2003 16:46:36 GMT

I'm trying to use validwhen, so that it's only valid when either all three
related fields are empty or are filled, it's valid; otherwise not.  ssn_1,
ssn_2, and ssn_3 are the field names.  For some reason, when I put this in,
none of the validation takes place, not even required, minlength, maxlength,
nor mask, which all worked before I put validwhen in there.  Did I do
anything wrong?

Here's the one of the fields in my validation.xml file:

<field property="ssn_1" depends="validwhen, required, minlength, maxlength,
	<msg name="required" key="errors.required.enter" />
	<msg name="minlength" key="errors.minlength.digit" />
	<msg name="maxlength" key="errors.maxlength.digit" />
	<msg name="mask" key="errors.mask.numeric" />
	<arg0 key="ssn_1.displayName" />
	<arg1 name="minlength" key="${var:minlength}" resource="false" />
	<arg1 name="maxlength" key="${var:maxlength}" resource="false" />
		<var-value>( (*this* == null) and (ssn_2 == null) and (ssn_3
== null) )</var-value>



This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message