You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Daniel Bray (CAPE)" <da...@capetechnologies.com> on 2002/11/19 18:52:53 UTC

validation problem: limit on the number of fields allowed in a form

I have a strange problem involving the validation of fairly big forms.

First a preamble: the form itself always has the same name, but the field
that it's validating won't be known until runtime. There are 366 fields per
version and there are at least four versions.

I had tried to get around this by auto generating a big validation xml file
where each <field> had a unique id that could be derived at runtime: the JSP
could populate a hidden field of the same name with the value being saved,
and so validation could be done.

This worked fine when I was testing it for a handful of fields, the problem
arose when I tried to create a validation XML file with 1,464 fields.

In the rendered HTML page, I get this:

    function TAPMask () {
     this.aa = new Array(.....);
     this.ab = new Array(.....);
      ...
     this.zy = new Array(.....);
     this.zz = new Array(.....);
     this.null = new Array(.....);     // this ain't right
     this.aa = new Array(.....);
     this.ab = new Array(.....);
      ...
     this.uw = new Array(.....);
   }

As you can see the variable names run out at "zz" and then roll over.

What I'm asking here is:
1. Is this a recognized bug, and if so, is there any ETA on when this will
be fixed?
2. Currently I'm using the following to include the validation client-side.
    <%-- Struts validation --%>
    <html:javascript formName="tapConfigForm"/>

I can't change the form name for each field, or even for each field group
(there's too many) but is there any way of defining multiple validation
files for a form and then telling the validator to use a specific file.


Thanks for reading this far.



from me, daniel.










--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>