struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Todd Nine <>
Subject Complex Validation with validwhen and large condition
Date Fri, 25 Feb 2005 19:21:01 GMT
Hi all, 
   I'm having some issues getting validwhen to perform the way I want
it to.  I would like the following general functionality.

1. The user can input an aseAddress.  
2. The address as a whole is nullable, however if they fill in any of
the fields, they must filling ALL of the address fields.

Here are my properties


addressLine2 and zip4 are not required.  However, if any field in the
list above contains data, then all of the fields except for
addressLine2 and zip4 are required.

Here is an example contition I have tried, but I contantly get that
the fields are required, even when they are all empty.  If anyone who
has a better way, please let me know.

<field property="aseAddress.addressLine1" depends="validwhen, mask">
				<arg0 key="prompt.common.addressLine1" />
												(*this* != null) 
												and (aseAddress.addressLine2 != null)
											) and ( != null)
										) and (aseAddress.state != null)
									) and (aseAddress.postalCode4 != null)
								) and ( != null)
							) and (aseAddress.postalCode != null)

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

View raw message