Chaudhary, Harsh wrote:
> Now that I think about it, my question is just this:
>
> Is there a way to selectively validate fields in a struts form?
>
Yes, only put the fields you want into the validation rule.
>>> <formset>
>>> <form name="/ClientA">
>>>
>>> <field property="clientaFirstName" depends="required,mask">
>>> <msg key="lnra.clienta.clientaFirstName" name="required"/>
>>> <msg name="mask" key="lnra.global.nameMask"/>
>>> <var>
>>> <var-name>mask</var-name>
>>> <var-value>${nameMask}</var-value>
>>> </var>
>>> </field>
>>> </form>
>>>
>>> </formset>
>>>
Create another form with the name attribute set to the action of the
other place the form-bean is used. So
What you _mean_ to be asking is if I visit an action and don't want the
validation to run until the person _submits_ from that action, which was
the discussion of a minor thread late last week.
Personally, I _never_ use automatic validation and I _always_ submit
with a POST. This makes it trivial to divide my actions up into GET and
POST handlers. I only call validation on POSTs.
A few other options were also discussed.
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]