struts的validator框架問題?急

crash發表於2006-03-12
我depends設了required,minlength可執行的時候required執行的,可minlength根本沒反映,請指點,謝了

validation.xml程式碼如下

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE form-validation PUBLIC "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.0//EN" "validator_1_0.dtd" >

<form-validation>
<formset>
<form name="registerForm">
<field property="userName" depends="required">
<arg0 key="reg.name"/>
</field>
<field property="password" depends="required,minlength">
<arg0 key="reg.password"/>
<arg1 key="req2.password"/>
<var>
<var-name>minlength</var-name>
<var-value>3</var-value>
</var>
</field>
</form>
</formset>
</form-validation>

相關文章