diff options
Diffstat (limited to 'client/src/app/shared/forms/form-validators/user.ts')
-rw-r--r-- | client/src/app/shared/forms/form-validators/user.ts | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/client/src/app/shared/forms/form-validators/user.ts b/client/src/app/shared/forms/form-validators/user.ts index d2a28a272..095b534c0 100644 --- a/client/src/app/shared/forms/form-validators/user.ts +++ b/client/src/app/shared/forms/form-validators/user.ts | |||
@@ -46,3 +46,27 @@ export const USER_ROLE = { | |||
46 | 'required': 'User role is required.' | 46 | 'required': 'User role is required.' |
47 | } | 47 | } |
48 | } | 48 | } |
49 | export const USER_DISPLAY_NAME = { | ||
50 | VALIDATORS: [ | ||
51 | Validators.required, | ||
52 | Validators.minLength(3), | ||
53 | Validators.maxLength(120) | ||
54 | ], | ||
55 | MESSAGES: { | ||
56 | 'required': 'Display name is required.', | ||
57 | 'minlength': 'Display name must be at least 3 characters long.', | ||
58 | 'maxlength': 'Display name cannot be more than 120 characters long.' | ||
59 | } | ||
60 | } | ||
61 | export const USER_DESCRIPTION = { | ||
62 | VALIDATORS: [ | ||
63 | Validators.required, | ||
64 | Validators.minLength(3), | ||
65 | Validators.maxLength(250) | ||
66 | ], | ||
67 | MESSAGES: { | ||
68 | 'required': 'Display name is required.', | ||
69 | 'minlength': 'Display name must be at least 3 characters long.', | ||
70 | 'maxlength': 'Display name cannot be more than 250 characters long.' | ||
71 | } | ||
72 | } | ||