1 <objects xmlns="http://www.springframework.net"
2 xmlns:v="http://www.springframework.net/validation">
3 <v:group id="UserValidator">
4 <v:validator id="UserNameValidator" type="Spring.Validation.ValidatorGroup, Spring.Core">
5 <v:property name="FastValidate" value="true"/>
6 <v:property name="Validators">
7 <list>
8 <ref object="UserNameRequired"/>
9 <ref object="UserNameMinimumComplexity"/>
10 <ref object="UserNameIsUnique"/>
11 </list>
12 </v:property>
13 </v:validator>
14
15 <!-- ...more validators -->
16 </v:group>
17
18 <v:required id="UserNameRequired" test="UserName">
19 <v:message id="Errors.UserName.Required" providers="UserNameError"/>
20 </v:required>
21
22 <v:regex id="UserNameMinimumComplexity" test="UserName">
23 <v:property name="Expression" value="^.{5,20}$"/>
24 <v:message id="Errors.UserName.MinimumComplexity" providers="UserNameError"/>
25 </v:regex>
26
27 <v:validator id="UserNameIsUnique" test="UserName" type="XXX.Infrastructure.Validation.IsUniqueUserNameValidator, HSN.Infrastructure">
28 <v:property name="UserRepository" ref="UserRepository"/>
29 <v:message id="Errors.UserName.IsUnique" providers="UserNameError"/>
30 </v:validator>
31
32 <!-- ...more validators -->
33 </objects>
0 comments:
Post a Comment