You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Anna Simbirtsev <as...@gmail.com> on 2007/08/27 21:58:00 UTC

Specify a name for a validate function

Hello

    <action    path="/value_add"
               type="com.struts.action.MyAction"
               name="value_add_form"
               scope="request"
               validate="true">
  </action>

Does it call the validate function in the form class?
Can I specify the name of validate the function to call?

Thank you

Re: Specify a name for a validate function

Posted by j alex <st...@gmail.com>.
Struts 1 ; if validate=true, it looks for a method called validate() in
ActionForm (ie value_add_form) , Action ( ie MyAction) or if you've
configured validation xml, validations are run using that

On 8/27/07, Anna Simbirtsev <as...@gmail.com> wrote:
>
> Hello
>
>     <action    path="/value_add"
>                type="com.struts.action.MyAction"
>                name="value_add_form"
>                scope="request"
>                validate="true">
>   </action>
>
> Does it call the validate function in the form class?
> Can I specify the name of validate the function to call?
>
> Thank you
>