Hi,

I am having some problems in  getting struts to
validate my input form. It seems to completely ignore
the validation and starts executing the action. 

Here are the relevant files. Any help regarding this
is highly appreciated.

TIA 

Maha

struts-config.xml
------------------

    <form-beans>
      <!-- objectType form bean -->
      <form-bean name="ObjectTypeForm"
                       type="forms.ObjectTypeForm"
dynamic="true">
        <form-property name="objectType"
type="java.lang.String"/>
        <form-property name="description"
type="java.lang.String"/>
      </form-bean>

    </form-beans>

the action - mappings contains
 
          <action  path="/ObjectType"
                     type="actions.ObjectTypeAction"
                  name="ObjectTypeForm"
                  scope="request"
                  validate="true"
                  input="/objecttype.jsp"
                  parameter="function">
              <forward name="failure"
path="/error.jsp" />
              <forward name="success"
path="/index.jsp" />
              <forward name="goToAddStartPage"
path="/objecttype.jsp" />
          </action>

The ObjectTypeAction class extends DispatchAction.

validate.xml
------------

<form-validation>
    <formset>
        <form name="ObjectTypeForm">
            <field property="objectType"
depends="required">
                <arg0 key="prompt.objecttype"/>
            </field>
        </form>
    </formset>
</form-validation>

validation-rules.xml
--------------------

<form-validation>
  <global>
    <validator name="required"
         
classname="org.apache.struts.validator.FieldChecks"
             method="validateRequired"
       methodParams="java.lang.Object,
                    
org.apache.commons.validator.ValidatorAction,
                    
org.apache.commons.validator.Field,
                    
org.apache.struts.action.ActionErrors,
                    
javax.servlet.http.HttpServletRequest"
                msg="errors.required">
    </validator>
  </global>
</form-validation>






__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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

Reply via email to