-
Notifications
You must be signed in to change notification settings - Fork 129
/
dataform-validation.component.html
37 lines (37 loc) · 2.3 KB
/
dataform-validation.component.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<RadDataForm tkExampleTitle tkToggleNavButton [source]="user">
<TKEntityProperty tkDataFormProperty name="username" index="0">
<TKNonEmptyValidator tkEntityPropertyValidators errorMessage="Username can't be empty."></TKNonEmptyValidator>
<TKMaximumLengthValidator tkEntityPropertyValidators errorMessage="Username can be at most 12 characters." length="12"></TKMaximumLengthValidator>
</TKEntityProperty>
<!-- >> angular-dataform-validation-html -->
<TKEntityProperty tkDataFormProperty name="password" index="1">
<TKPropertyEditor tkEntityPropertyEditor type="Password">
</TKPropertyEditor>
<TKMinimumLengthValidator tkEntityPropertyValidators
errorMessage="Password must be at least 6 characters long."
length="6">
</TKMinimumLengthValidator>
</TKEntityProperty>
<!-- << angular-dataform-validation-html -->
<TKEntityProperty tkDataFormProperty name="email" displayName="E-mail" index="2">
<TKPropertyEditor tkEntityPropertyEditor type="Email"></TKPropertyEditor>
<TKEmailValidator tkEntityPropertyValidators></TKEmailValidator>
</TKEntityProperty>
<TKEntityProperty tkDataFormProperty name="id" displayName="ID" index="3">
<TKRangeValidator tkEntityPropertyValidators errorMessage="ID must be between 1-100." minimum="1" maximum="100"></TKRangeValidator>
<TKPropertyEditor tkEntityPropertyEditor type="Number"></TKPropertyEditor>
</TKEntityProperty>
<TKEntityProperty tkDataFormProperty name="phoneNumber" displayName="Phone Number" index="4">
<TKPhoneValidator tkEntityPropertyValidators errorMessage="Incorrect phone number"></TKPhoneValidator>
<TKPropertyEditor tkEntityPropertyEditor type="Phone"></TKPropertyEditor>
</TKEntityProperty>
<!-- >> angular-dataform-validation-regex-html -->
<TKEntityProperty tkDataFormProperty name="pin" displayName="Enter PIN" index="5">
<TKRegExValidator tkEntityPropertyValidators regEx="\d{4}" errorMessage="PIN number should contain 4 digits."></TKRegExValidator>
</TKEntityProperty>
<!-- << angular-dataform-validation-regex-html -->
<TKEntityProperty tkDataFormProperty name="agreeTerms" displayName="I agree with terms" index="6">
<TKPropertyEditor tkEntityPropertyEditor type="Switch"></TKPropertyEditor>
<TKIsTrueValidator tkEntityPropertyValidators errorMessage="You must agree with the terms."></TKIsTrueValidator>
</TKEntityProperty>
</RadDataForm>