commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niall Pemberton" <niall.pember...@gmail.com>
Subject Re: Associating Multiple Messages with a Validation Rule
Date Thu, 13 Apr 2006 09:35:12 GMT
On 4/13/06, Asad Habib <ahabib@engin.umich.edu> wrote:
> Is there a way to associate multiple messages with a single validation
> rule? In particular, I would like to associate multiple messages with the
> required rule so that I can have a different message displayed depending
> on the field being validated. Thanks.

Yes you can use a message element for the particular field to override
the "default" required validator message

<field property="foo" depends="required">
     <msg name="required" key="foo.required.error"/>
</field>

Niall

> - Asad

---------------------------------------------------------------------
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