diff options
Diffstat (limited to 'client/src/app/shared/form-validators/video-ownership-change-validators.ts')
-rw-r--r-- | client/src/app/shared/form-validators/video-ownership-change-validators.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/client/src/app/shared/form-validators/video-ownership-change-validators.ts b/client/src/app/shared/form-validators/video-ownership-change-validators.ts index e1a2df8a6..3e7823c49 100644 --- a/client/src/app/shared/form-validators/video-ownership-change-validators.ts +++ b/client/src/app/shared/form-validators/video-ownership-change-validators.ts | |||
@@ -4,21 +4,21 @@ import { BuildFormValidator } from './form-validator.model' | |||
4 | export const OWNERSHIP_CHANGE_CHANNEL_VALIDATOR: BuildFormValidator = { | 4 | export const OWNERSHIP_CHANGE_CHANNEL_VALIDATOR: BuildFormValidator = { |
5 | VALIDATORS: [ Validators.required ], | 5 | VALIDATORS: [ Validators.required ], |
6 | MESSAGES: { | 6 | MESSAGES: { |
7 | 'required': $localize`The channel is required.` | 7 | required: $localize`The channel is required.` |
8 | } | 8 | } |
9 | } | 9 | } |
10 | 10 | ||
11 | export const OWNERSHIP_CHANGE_USERNAME_VALIDATOR: BuildFormValidator = { | 11 | export const OWNERSHIP_CHANGE_USERNAME_VALIDATOR: BuildFormValidator = { |
12 | VALIDATORS: [ Validators.required, localAccountValidator ], | 12 | VALIDATORS: [ Validators.required, localAccountValidator ], |
13 | MESSAGES: { | 13 | MESSAGES: { |
14 | 'required': $localize`The username is required.`, | 14 | required: $localize`The username is required.`, |
15 | 'localAccountOnly': $localize`You can only transfer ownership to a local account` | 15 | localAccountOnly: $localize`You can only transfer ownership to a local account` |
16 | } | 16 | } |
17 | } | 17 | } |
18 | 18 | ||
19 | function localAccountValidator (control: AbstractControl): ValidationErrors { | 19 | function localAccountValidator (control: AbstractControl): ValidationErrors { |
20 | if (control.value.includes('@')) { | 20 | if (control.value.includes('@')) { |
21 | return { 'localAccountOnly': true } | 21 | return { localAccountOnly: true } |
22 | } | 22 | } |
23 | 23 | ||
24 | return null | 24 | return null |