You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Nicolas De Loof <ni...@capgemini.com> on 2005/12/09 14:34:42 UTC
how to setup 2 validwhen-based validation rules
Hello,
I've a form where some data are required IF an option is selected + I've
to check for duplicated entries.
I can setup validation rules using validwhen for both case, but how to
register those 2 rules (with different message) under the same validwhen
validator ?
Nico.
This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: how to setup 2 validwhen-based validation rules
Posted by Laurie Harper <la...@holoweb.net>.
Nicolas De Loof wrote:
>
> Hello,
>
> I've a form where some data are required IF an option is selected + I've
> to check for duplicated entries.
>
> I can setup validation rules using validwhen for both case, but how to
> register those 2 rules (with different message) under the same validwhen
> validator ?
You can't have two seperate validwhen rules on one form property, but
you can combine them into one rule. I don't think there's any way to
change the error message according to which clause fails, though, so
you'd need to write an error message that covers both cases.
L.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org