<form-validation>
<global>
<constant>
<constant-name>phone</constant-name>
<constant-value>^\(?(\d{3})\)?[-| ]?(\d{8})$</constant-value>
</constant>
</global>
<formset>
<form name = "addMemberForm">
<field
property = "username"
depends = "required">
<arg0 key = "lable.username"/>
</field>
<field
property = "password"
depends = "required">
<arg0 key = "lable.password"/>
</field>
<field
property = "birthday"
depends = "required,date">
<arg0 key = "lable.birthday"/>
</field>
<field
property = "phone"
depends = "required,mask">
<arg0 key = "lable.phone"/>
<var>
<var-name>mask</var-name>
<var-value>${phone}</var-value>
</var>
</field>
<field
property = "address"
depends = "required">
<arg0 key = "lable.address"/>
</field>
<field
property = "email"
depends = "required,email">
<arg0 key = "lable.email"/>
</field>
</form>
<form name = "loginForm">
<field
property = "username"
depends = "required">
<arg0 key = "lable.username"/>
</field>
<field
property = "password"
depends = "required">
<arg0 key = "lable.password"/>
</field>
</form>
</formset>
</form-validation>
validation.xml(validator验证器配置文件)
最新推荐文章于 2019-08-01 16:17:42 发布