diff options
Diffstat (limited to 'client/src/app/shared/forms/form-validators/video-change-ownership-validators.service.ts')
-rw-r--r-- | client/src/app/shared/forms/form-validators/video-change-ownership-validators.service.ts | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/client/src/app/shared/forms/form-validators/video-change-ownership-validators.service.ts b/client/src/app/shared/forms/form-validators/video-change-ownership-validators.service.ts new file mode 100644 index 000000000..087b80b44 --- /dev/null +++ b/client/src/app/shared/forms/form-validators/video-change-ownership-validators.service.ts | |||
@@ -0,0 +1,18 @@ | |||
1 | import { I18n } from '@ngx-translate/i18n-polyfill' | ||
2 | import { Validators } from '@angular/forms' | ||
3 | import { Injectable } from '@angular/core' | ||
4 | import { BuildFormValidator } from '@app/shared' | ||
5 | |||
6 | @Injectable() | ||
7 | export class VideoChangeOwnershipValidatorsService { | ||
8 | readonly USERNAME: BuildFormValidator | ||
9 | |||
10 | constructor (private i18n: I18n) { | ||
11 | this.USERNAME = { | ||
12 | VALIDATORS: [ Validators.required ], | ||
13 | MESSAGES: { | ||
14 | 'required': this.i18n('The username is required.') | ||
15 | } | ||
16 | } | ||
17 | } | ||
18 | } | ||