Hi,
I want to do custom validation in
struts 1.3.10
I have written following code,
validator-rules.xml
--------------
<validator name="ValidateCustomerCode"
classname="com.algo.struts.actions.ValidateHelper"
method="validateCustomerCode"
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.customer"/>
validate.xml
----------------
<field property="customerCode" depends="required,ValidateCustomerCode">
<arg position="0" key="fmCustomerMaster.customerCode"/>
<msg name="ValidateCustomerCode" key="errors.customer" />
</field>
And i have created
Java Class ValidateHelper in package com.algo.struts.actions and written static method validateCustomerCode
But this method is not calling .So now validation is perform.
Please let me know i do not get reason .Do i need to change anything in Form Validation method also ?