aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/form-validators/video-channel-validators.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/shared/form-validators/video-channel-validators.ts')
-rw-r--r--client/src/app/shared/form-validators/video-channel-validators.ts13
1 files changed, 13 insertions, 0 deletions
diff --git a/client/src/app/shared/form-validators/video-channel-validators.ts b/client/src/app/shared/form-validators/video-channel-validators.ts
index 163faf270..b12b3caaf 100644
--- a/client/src/app/shared/form-validators/video-channel-validators.ts
+++ b/client/src/app/shared/form-validators/video-channel-validators.ts
@@ -48,3 +48,16 @@ export const VIDEO_CHANNEL_SUPPORT_VALIDATOR: BuildFormValidator = {
48 maxlength: $localize`Support text cannot be more than 1000 characters long.` 48 maxlength: $localize`Support text cannot be more than 1000 characters long.`
49 } 49 }
50} 50}
51
52export const VIDEO_CHANNEL_EXTERNAL_URL_VALIDATOR: BuildFormValidator = {
53 VALIDATORS: [
54 Validators.required,
55 Validators.pattern(/^https?:\/\//),
56 Validators.maxLength(1000)
57 ],
58 MESSAGES: {
59 required: $localize`Remote channel url is required.`,
60 pattern: $localize`External channel URL must begin with "https://" or "http://"`,
61 maxlength: $localize`External channel URL cannot be more than 1000 characters long`
62 }
63}