能不能把你的<html:form>也贴出来
可能你的这个写的有问题
<html:form action="你的action"  onsubmit="return validationcustomerForm">
..
...</body>
<html:javascript formName="customerForm">

解决方案 »

  1.   

    在配制文件里.VALIDATE=TRUE能不能把你的 <html:form>也贴出来 
    可能你的这个写的有问题 
    <html:form action="你的action"  onsubmit="return validateCustomerForm(this)"> 
    .. 
    ... </body> 
    <html:javascript formName="customerForm">
      

  2.   

    2楼的,我在配置文件里validate=true也没有用。1楼的:你要的代码<html:form action="customer" focus="customer.name">
    <table border="1">
    <tr>
    <td>
    <label>
    <bean:message key="page.customer.index.name.label"/>
    </label>
    <html:text property="customer.name" size="8" maxlength="4"/>
    </td>
      

  3.   

    原因:
    type="org.apache.struts.validator.DynaValidatorActionForm
    改成type="org.apache.struts.validator.DynaValidatorForm因为你在你的validate.xml中配置的是
    <form name="customerForm">
          <field property="customer.name" depends="required">
            <arg key="page.customer.index.name.label" position="0"/>                      
          </field>
        </form><form name="customerForm">name中是你的form的名字
    所以要用DynaValidatorForm
      

  4.   

    ignoreEmptyValue  表明validator是否忽略空值不进行判断