Struts2校验器的问题
我前台页面有两个表单,都是输入密码的,我用的是Struts2的校验框架
<field name="regpassword">
<field-validator type="requiredstring">
<param name="trim">true</param>
<message>密码不能为空!</message>
</field-validator>
<field-validator type="stringlength">
<param name="minLength">4</param>
<param name="maxLength">18</param>
<message>密码的长度应在${minLength}到${maxLength}之间</message>
</field-validator>
</field>
我要怎么配置再次输入密码要跟上面的一致怎么配置才好呢
------解决方案--------------------
<field name="regpassword2">
<field-validator type="fieldexpression">
<param name="expression"> <![CDATA[(regpassword==regpassword2)]]>
</param>
<message>两次密码不一致</message>
</field-validator>
</field>