]>
Commit | Line | Data |
---|---|---|
4b2f33f3 C |
1 | import { Validators } from '@angular/forms'; |
2 | ||
3 | export const VIDEO_NAME = { | |
4 | VALIDATORS: [ Validators.required, Validators.minLength(3), Validators.maxLength(50) ], | |
5 | MESSAGES: { | |
6 | 'required': 'Video name is required.', | |
7 | 'minlength': 'Video name must be at least 3 characters long.', | |
8 | 'maxlength': 'Video name cannot be more than 50 characters long.' | |
9 | } | |
10 | }; | |
6e07c3de C |
11 | export const VIDEO_CATEGORY = { |
12 | VALIDATORS: [ Validators.required ], | |
13 | MESSAGES: { | |
14 | 'required': 'Video category is required.' | |
15 | } | |
16 | }; | |
4b2f33f3 C |
17 | export const VIDEO_DESCRIPTION = { |
18 | VALIDATORS: [ Validators.required, Validators.minLength(3), Validators.maxLength(250) ], | |
19 | MESSAGES: { | |
20 | 'required': 'Video description is required.', | |
21 | 'minlength': 'Video description must be at least 3 characters long.', | |
22 | 'maxlength': 'Video description cannot be more than 250 characters long.' | |
23 | } | |
24 | }; | |
25 | ||
26 | export const VIDEO_TAGS = { | |
e54163c2 | 27 | VALIDATORS: [ Validators.maxLength(10) ], |
4b2f33f3 | 28 | MESSAGES: { |
e54163c2 | 29 | 'maxlength': 'A tag should be less than 10 characters long.' |
4b2f33f3 C |
30 | } |
31 | }; |