]>
Commit | Line | Data |
---|---|---|
df98563e | 1 | import { Validators } from '@angular/forms' |
4b2f33f3 C |
2 | |
3 | export const USER_USERNAME = { | |
4 | VALIDATORS: [ Validators.required, Validators.minLength(3), Validators.maxLength(20) ], | |
5 | MESSAGES: { | |
6 | 'required': 'Username is required.', | |
7 | 'minlength': 'Username must be at least 3 characters long.', | |
8 | 'maxlength': 'Username cannot be more than 20 characters long.' | |
9 | } | |
df98563e | 10 | } |
ad4a8a1c | 11 | export const USER_EMAIL = { |
c689fcdc | 12 | VALIDATORS: [ Validators.required, Validators.email ], |
ad4a8a1c C |
13 | MESSAGES: { |
14 | 'required': 'Email is required.', | |
df98563e | 15 | 'email': 'Email must be valid.' |
ad4a8a1c | 16 | } |
df98563e | 17 | } |
4b2f33f3 C |
18 | export const USER_PASSWORD = { |
19 | VALIDATORS: [ Validators.required, Validators.minLength(6) ], | |
20 | MESSAGES: { | |
21 | 'required': 'Password is required.', | |
df98563e | 22 | 'minlength': 'Password must be at least 6 characters long.' |
4b2f33f3 | 23 | } |
df98563e | 24 | } |