Jack Perrett wrote:
>I'm trying to create a form that will be validated over a series of jsp's. I'm
>using the page property with individual fields to specify whether they should
>be validated on a particular page and then setting the hidden page property to
>whatever the corurrent jsp page.
>
>This is how my field looks in the validation.xml
>
><field property="adults"
> page="2"
> depends="required">
>
> <arg0 key="passengerBookingForm.adults"/>
></field>
>
>But it just seems to ignore this validation whatever I set the form page
>property to. I'm expecting it to perform this validation if the form page
>property is >= 2, and ignore the validation altogether if the form page
>property is < 2.
>
>I have noticed that changing the page value to an integer (without the quotes)
>eg
>
><field property="adults"
> page=2
> depends="required">
>
> <arg0 key="passengerBookingForm.adults"/>
></field>
>
>it does the validation, but it will do it no matter what I set the page form
>property to. Has anybody got this working or know what I'm doing wrong?
>I appreciate any help, thank you,
>
>
Yup, it's quite easy. Just set a hidden value in the page.
<input type="hidden" property="page" value="1"/>
Then in your validation.xml for your form do this:
<form name="yourform">
<field property="fieldname"
depends="required"
page="1">
</field>
</form>
Hope this helps.
Brandon
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]