diff options
Diffstat (limited to 'client/src/app/shared/forms')
-rw-r--r-- | client/src/app/shared/forms/form-validators/custom-config-validators.service.ts | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/client/src/app/shared/forms/form-validators/custom-config-validators.service.ts b/client/src/app/shared/forms/form-validators/custom-config-validators.service.ts index 882e39453..767e3f026 100644 --- a/client/src/app/shared/forms/form-validators/custom-config-validators.service.ts +++ b/client/src/app/shared/forms/form-validators/custom-config-validators.service.ts | |||
@@ -13,6 +13,7 @@ export class CustomConfigValidatorsService { | |||
13 | readonly SIGNUP_LIMIT: BuildFormValidator | 13 | readonly SIGNUP_LIMIT: BuildFormValidator |
14 | readonly ADMIN_EMAIL: BuildFormValidator | 14 | readonly ADMIN_EMAIL: BuildFormValidator |
15 | readonly TRANSCODING_THREADS: BuildFormValidator | 15 | readonly TRANSCODING_THREADS: BuildFormValidator |
16 | readonly INDEX_URL: BuildFormValidator | ||
16 | 17 | ||
17 | constructor (private i18n: I18n) { | 18 | constructor (private i18n: I18n) { |
18 | this.INSTANCE_NAME = { | 19 | this.INSTANCE_NAME = { |
@@ -78,5 +79,13 @@ export class CustomConfigValidatorsService { | |||
78 | 'min': this.i18n('Transcoding threads must be greater or equal to 0.') | 79 | 'min': this.i18n('Transcoding threads must be greater or equal to 0.') |
79 | } | 80 | } |
80 | } | 81 | } |
82 | |||
83 | this.INDEX_URL = { | ||
84 | VALIDATORS: [ Validators.required, Validators.pattern(/^https:\/\//) ], | ||
85 | MESSAGES: { | ||
86 | 'required': this.i18n('Index URL is required.'), | ||
87 | 'pattern': this.i18n('Index URL should be a URL') | ||
88 | } | ||
89 | } | ||
81 | } | 90 | } |
82 | } | 91 | } |