Hi Adam,
Yes, I think html:errors is a pretty good validaiton mechanism.
Especially if you use the Struts validation framework (validation.xml,
validator-rules.xml) for
generating your errors.

For showing errors right beside each specific field that fails the
validation, you will need
to have <html:errors property="property-name"></html:errors>  tag beside
each field.

But if you want to show all the errors at once (say above all the fields)
then you can use
<html:errors/> tag as-is.

Check this link for more info : (this link is not _outdated)
http://www.niallp.pwp.blueyonder.co.uk/HelpTagsErrorsAndMessages.html#section2

hope this helps,
robin

On 11/3/06, Adam K <[EMAIL PROTECTED]> wrote:

Hi all I am using struts 1.2.9 and starting to work on error
validation.  So
far I have my login page using:

             <html:errors property="username"></html:errors>
etc etc etc.

I was wondering firstly Is this still the best manner in which to display
errors ?


The second question which has more to do with the title is
How does one use error validation on fields that are iterated ?

As an example if I have 3 fields where a team has to enter a score, I want
to ensure that the only values that are entered beside each field is a
number.  If any of those fields have other than a number I want the error
to
appear only beside that particular field.  Is this something that can be
done with error validation ?  I am looking around for examples but most
examples are quite dated and I am trying to use the best things available
to
me.

thanks in advance.
Adam


Reply via email to