The Validator has some concept with the page attribute.  If you look at the
"Multi Page Form" section you get a hint at it:
http://jakarta.apache.org/struts/userGuide/dev_validator.html


In your jsp you need an element called page.  I usually just put a static
hidden tag:
<html:hidden property="page" value="2"/>

Then in your validation.xml you associated a page number with the element:
<field property="user.firstName" depends="required" page="2"/>

So what the validator does is only validate the field if the page attribute
is >=.

So for this example above... The "user.firstName" field would NOT be
validated on page 1, but would be validated on page 2, page 3, etc.

-Jordan Reed (http://www.chaosserver.net)



On 6/13/03 5:40 AM, "Gregory F. March" <[EMAIL PROTECTED]> wrote:

> 
> I'm using a DynaValidatorForm with validation rules in
> validation.xml.  My form is a multipage form, and I (obviously) would
> like to validate only the parameters "in scope" for the current page.
> 
> Can this be done through the xml file (if so, how)?  Or do I need to
> write my own validation class that looks at a "page" variable?
> 
> Thanks!
> 
> /greg
> 
> --
> Gregory F. March    -=-    http://www.gfm.net:81/~march    -=-    AIM:GfmNet


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

Reply via email to