Hi all,

This is probably a common question but have struggled to find an answer so
apologies if I have missed the obvious. Below is an example of issue:

I have a page that uses a single form to hold all the display data but can
perform the following multiple submit actions:

Create - create as a new object
Update - update the original

The page calls "/process_object.do" which is represented by a DispatchAction
that has a method for each submit action. This is simple to implement and is
all working fine.

I now turn to the validation framework I want to specify a rule to validate
the name to 3 characters only when the submitaction is create and this is my
problem. So the basic validation.xml entry is:

<form name="/process_object">
        <field property="name" depends="minlength">
                <arg0 key="name.heading"/>
                <arg1 key="${var:minlength}" name="minlength"
resource="false"/>
                <var>
                        <var-name>minlength</var-name>
                        <var-value>3</var-value>
                </var>
        </field>           
</form>   

This validates at the action mapping level so in the above case it validates
on update as well as create. 

How do you validate just against the create submitaction of the
DispatchAction mapping?

Regards,

Andy Foster







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

Reply via email to