X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fshared%2Fforms%2Fform-validators%2Fcustom-config-validators.service.ts;h=fdb19e06a902bdc9867a63f162b059dcd3ed4c36;hb=5fb2e2888ce032c638e4b75d07458642f0833e52;hp=d20754d11dd0b1f5aec80b3344b5ccc1be43c0d5;hpb=818c449b3c34e9f324ac744120c8774e724ab25e;p=github%2FChocobozzz%2FPeerTube.git 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 d20754d11..fdb19e06a 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 @@ -14,6 +14,7 @@ export class CustomConfigValidatorsService { readonly ADMIN_EMAIL: BuildFormValidator readonly TRANSCODING_THREADS: BuildFormValidator readonly INDEX_URL: BuildFormValidator + readonly SEARCH_INDEX_URL: BuildFormValidator constructor (private i18n: I18n) { this.INSTANCE_NAME = { @@ -81,11 +82,17 @@ export class CustomConfigValidatorsService { } this.INDEX_URL = { - VALIDATORS: [ Validators.required, Validators.pattern(/^https:\/\//) ], + VALIDATORS: [ Validators.pattern(/^https:\/\//) ], MESSAGES: { - 'required': this.i18n('Index URL is required.'), 'pattern': this.i18n('Index URL should be a URL') } } + + this.SEARCH_INDEX_URL = { + VALIDATORS: [ Validators.pattern(/^https?:\/\//) ], + MESSAGES: { + 'pattern': this.i18n('Search index URL should be a URL') + } + } } }