errors.required={0} is required.
namelab=name
<formset>
<form name="regForm">
<field property="name" depends="required">
<arg key="namelab"/>
</field>
</form>
</formset>
<html:form action="reg.do">
     姓名:<html:text property="name"></html:text><html:errors property="name"/><br>
<html:submit value="login" html:submit>
</html:form>
错误是The content of element type "global" must match "(validator*,constant*)".

解决方案 »

  1.   

    提示你的配置文件中的信息没有参数
    你在验证FORMBEAN的时候,应该这样
    ActionMessages message=new ActionMessages();
    if(name==null){
    {
      message.add("name",new ActionMessage("errors.name"));
    }
    如果在ACTION中加上
    super.saveErrors(request, errors);
    资源文件  errors.name=<li><font color="red">\u7528\u6237\u540d\u4e0d\u80fd\u4e3a\u7a7a</font>
      

  2.   

    看提示像是数据校验xml文件不符合约束