I have a FormBean derived from ValidatorActionForm. I define validation rules for certain properties in validation.xml.

No I like to add some additional validations which depend on user input. I thought, I can handle this in the validate(..) method but it gets never called!

I implemented something like:

public class QueryTripsForm extends ValidatorActionForm
{
   ...
   public ActionErrors validate(ActionMapping mapping,
            javax.servlet.ServletRequest request)
   {
        ActionErrors e = null;
        super.validate(mapping, request);
        // doing some special checks here
        // ......               
        return e;
   }
   ....
}

Why is this validate method never called? (validate is set to true, see below)

    <action
      input="/form/queryTrips.jsp"
      name="queryTripsForm"
      path="/listTrips"
      scope="request"
      validate="true"
      type="ch.smartsol.struts.action.ListTripsAction">
      <forward name="Success" path="/template/ShowTripsResult.jsp" />
    </action>

Is there any way to combile 'default' validations defined in validation.xml with additional validations implemented in the validate() method??

Many thanks for your help.

Tom



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

Reply via email to