Well, this is what I inherited:

      <form    name="/public/EventRegistration">

                 <field    page="1" property="registrant.firstname"
                   depends="required,mask,minlength,maxlength">
                     <arg0 key="eForm.firstname"/>
                     <arg1 name="minlength" key="${var:minlength}"
resource="false"/>
                     <arg2 name="maxlength" key="${var:maxlength}"
resource="false"/>

                     <var>
                       <var-name>mask</var-name>
                       <var-value>^[a-zA-Z]*$</var-value>
                     </var>
                     <var>
                       <var-name>minlength</var-name>
                       <var-value>2</var-value>
                     </var>
                     <var>
                       <var-name>maxlength</var-name>
                       <var-value>40</var-value>
                     </var>

         </field>

         <field    page="1" property="registrant.lastname"
                   depends="required,mask,minlength,maxlength">
                     <arg0 key="eForm.lastname"/>
                     <arg1 name="minlength" key="${var:minlength}"
resource="false"/>
                     <arg2 name="maxlength" key="${var:maxlength}"
resource="false"/>
                     <var>
                       <var-name>mask</var-name>
                       <var-value>^[a-zA-Z]*$</var-value>
                     </var>
                     <var>
                       <var-name>minlength</var-name>
                       <var-value>2</var-value>
                     </var>
                     <var>
                       <var-name>maxlength</var-name>
                       <var-value>40</var-value>
                     </var>

         </field>


         <field    page="1" property="registrant.companyname"
                   depends="required,minlength,maxlength">
                     <arg0 key="eForm.companyname"/>
                     <arg1 name="minlength" key="${var:minlength}"
resource="false"/>
                     <arg2 name="maxlength" key="${var:maxlength}"
resource="false"/>
                     <var>
                       <var-name>minlength</var-name>
                       <var-value>1</var-value>
                     </var>
                     <var>
                       <var-name>maxlength</var-name>
                       <var-value>40</var-value>
                     </var>

         </field>

        </form>



----------------------------

The form-bean is:


    <form-bean       name="eventRegistrationForm"

type="ontario.exports.events.struts.EventRegistrationForm">
    </form-bean>

------------------------------------


The EventRegistrationForm extends EventDetailsForm which in-turn
extends - ValidatorBaseForm

These classes appear extremely messy and very long...

Thanks, Alex.



On Mon, 16 Jun 2003, David Graham wrote:

> Post the relevant section of your validation xml file and more info about
> your form.
>
> David
>
>
> >
> >Hi there,
> >
> >this is my first post!  I have inherited a web-based struts
> >project that is frankly a mess...  I have managed to straighten
> >out most things except something that is driving me nuts - this
> >is the problem:
> >
> >Validation - I have 3 fields that need to be validated - if I do not
> >enter anything on all three fields, validation happens - I display
> >the messages in the JSP using the <logic:messagesPresent> 'loop'.
> >However, the problem occurs if I fill in one of the fields, it
> >STILL reports that the first field is in error (the other two
> >which are unfilled are in error alos - this is a good thing), even though
> >there is
> >a value there (the validation is simple 'required').  If I fill in
> >ALL THREE FIELDS, then validation is OK, and I go on to the next
> >page.  There seems to be almost some kind of a "caching" of errors
> >that is happening, and I don't know how to "turn it off".
> >
> >Thanks Alex.
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
> _________________________________________________________________
> Help STOP SPAM with the new MSN 8 and get 2 months FREE*
> http://join.msn.com/?page=features/junkmail
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to