From e1b49ee534108ba8ac98dcb209d2efcbf1ecd678 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 4 Sep 2019 14:30:34 +0200 Subject: Implement auto follow in client --- .../forms/form-validators/custom-config-validators.service.ts | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'client/src/app/shared/forms') 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 { readonly SIGNUP_LIMIT: BuildFormValidator readonly ADMIN_EMAIL: BuildFormValidator readonly TRANSCODING_THREADS: BuildFormValidator + readonly INDEX_URL: BuildFormValidator constructor (private i18n: I18n) { this.INSTANCE_NAME = { @@ -78,5 +79,13 @@ export class CustomConfigValidatorsService { 'min': this.i18n('Transcoding threads must be greater or equal to 0.') } } + + this.INDEX_URL = { + VALIDATORS: [ Validators.required, Validators.pattern(/^https:\/\//) ], + MESSAGES: { + 'required': this.i18n('Index URL is required.'), + 'pattern': this.i18n('Index URL should be a URL') + } + } } } -- cgit v1.2.3