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'
7 export class VideoCaptionsValidatorsService {
8 readonly VIDEO_CAPTION_LANGUAGE: BuildFormValidator
9 readonly VIDEO_CAPTION_FILE: BuildFormValidator
11 constructor (private i18n: I18n) {
13 this.VIDEO_CAPTION_LANGUAGE = {
14 VALIDATORS: [ Validators.required ],
16 'required': this.i18n('Video caption language is required.')
20 this.VIDEO_CAPTION_FILE = {
21 VALIDATORS: [ Validators.required ],
23 'required': this.i18n('Video caption file is required.')