aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/forms
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/shared/forms')
-rw-r--r--client/src/app/shared/forms/form-validators/video-channel.ts34
1 files changed, 34 insertions, 0 deletions
diff --git a/client/src/app/shared/forms/form-validators/video-channel.ts b/client/src/app/shared/forms/form-validators/video-channel.ts
new file mode 100644
index 000000000..6233d17f7
--- /dev/null
+++ b/client/src/app/shared/forms/form-validators/video-channel.ts
@@ -0,0 +1,34 @@
1import { Validators } from '@angular/forms'
2
3export const VIDEO_CHANNEL_DISPLAY_NAME = {
4 VALIDATORS: [
5 Validators.required,
6 Validators.minLength(3),
7 Validators.maxLength(120)
8 ],
9 MESSAGES: {
10 'required': 'Display name is required.',
11 'minlength': 'Display name must be at least 3 characters long.',
12 'maxlength': 'Display name cannot be more than 120 characters long.'
13 }
14}
15export const VIDEO_CHANNEL_DESCRIPTION = {
16 VALIDATORS: [
17 Validators.minLength(3),
18 Validators.maxLength(250)
19 ],
20 MESSAGES: {
21 'minlength': 'Description must be at least 3 characters long.',
22 'maxlength': 'Description cannot be more than 250 characters long.'
23 }
24}
25export const VIDEO_CHANNEL_SUPPORT = {
26 VALIDATORS: [
27 Validators.minLength(3),
28 Validators.maxLength(300)
29 ],
30 MESSAGES: {
31 'minlength': 'Support text must be at least 3 characters long.',
32 'maxlength': 'Support text cannot be more than 300 characters long.'
33 }
34}