Chocobozzz/PeerTube

View on GitHub
client/src/app/shared/form-validators/video-captions-validators.ts

Summary

Maintainability
A
1 hr
Test Coverage
import { Validators } from '@angular/forms'
import { BuildFormValidator } from './form-validator.model'

export const VIDEO_CAPTION_LANGUAGE_VALIDATOR: BuildFormValidator = {
  VALIDATORS: [ Validators.required ],
  MESSAGES: {
    required: $localize`Video caption language is required.`
  }
}

export const VIDEO_CAPTION_FILE_VALIDATOR: BuildFormValidator = {
  VALIDATORS: [ Validators.required ],
  MESSAGES: {
    required: $localize`Video caption file is required.`
  }
}

export const VIDEO_CAPTION_FILE_CONTENT_VALIDATOR: BuildFormValidator = {
  VALIDATORS: [ Validators.required ],
  MESSAGES: {
    required: $localize`Caption content is required.`
  }
}