You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Minh Tran <Mi...@yamaha-motor.com> on 2001/10/03 22:40:31 UTC

How to customize the way Validation Error is display

Does anyone know how to control and customize the way the validation error
is display when when fills out incorrect form information?

Thanks,
Minh

Re: How to customize the way Validation Error is display

Posted by David Winterfeldt <dw...@yahoo.com>.
I'm not sure if this is what you were asking about,
but you can use html:messages instead of html:errors
to give a little more control over displaying errors. 
The html:messages tag iterates over the errors so you
can insert markup around an individual message.  You
can also use the property attribute to retrieve a
message for an individual property (html:errors and
html:messages) so you could display an error message
next to each field.

<ul>
   <html:messages id="message" property="firstName">
      <li><bean:write name="message"/></li>
   </html:messages>
</ul>

David

--- Adam Grohs <as...@hotmail.com> wrote:
> Have a look at an implimentation description and
> sample that I've put
> together at www.leanonme.org.  Hope this helps.
> Thanks,
> Adam S. Grohs
> agrohs@ixl.com
> 
> ----- Original Message -----
> From: "Minh Tran" <Mi...@yamaha-motor.com>
> To: <st...@jakarta.apache.org>
> Sent: Wednesday, October 03, 2001 3:40 PM
> Subject: How to customize the way Validation Error
> is display
> 
> 
> > Does anyone know how to control and customize the
> way the validation error
> > is display when when fills out incorrect form
> information?
> >
> > Thanks,
> > Minh
> >
> 


__________________________________________________
Do You Yahoo!?
NEW from Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1

Re: How to customize the way Validation Error is display

Posted by Adam Grohs <as...@hotmail.com>.
Have a look at an implimentation description and sample that I've put
together at www.leanonme.org.  Hope this helps.
Thanks,
Adam S. Grohs
agrohs@ixl.com

----- Original Message -----
From: "Minh Tran" <Mi...@yamaha-motor.com>
To: <st...@jakarta.apache.org>
Sent: Wednesday, October 03, 2001 3:40 PM
Subject: How to customize the way Validation Error is display


> Does anyone know how to control and customize the way the validation error
> is display when when fills out incorrect form information?
>
> Thanks,
> Minh
>