> -----Original Message----- > From: N G [mailto:[EMAIL PROTECTED] > Sent: Tuesday, May 31, 2005 3:37 PM > To: Struts-user > Subject: Automatic validation question... > > If I have set up validation as follows: > > <field property="myField" depends="validwhen, required"> > <arg0 key="myForm.FirstName"/> > <var> > <var-name>test</var-name> > <var-value>(radioButton = "firstNameSearch")var-value> > </var> > </field> > > If "validwhen" failts, will it try to validate the "required"?
I'm pretty sure it will go through all of the "depends" so that it can display *all* of the validation errors. Try it and see. - Dave > In other words, when using automatic validation, the validator goes > through the list in "depends" and quits as soon as something is not > valid or does it keep going? > > Also, does my "validwhen" look right? I have different types of > searches on my form and depending on which search (radio button) > the user clicks, different fields are required. So, if the user > clicks on "First Name Search", the first name field will be required. > Did I set it up correctly? Why not use requiredif? - Dave --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]