1 import { Validators } from '@angular/forms'
3 export type ValidatorMessage = {
5 [ error: string ]: string
9 export const VIDEO_NAME = {
10 VALIDATORS: [ Validators.required, Validators.minLength(3), Validators.maxLength(120) ],
12 'required': 'Video name is required.',
13 'minlength': 'Video name must be at least 3 characters long.',
14 'maxlength': 'Video name cannot be more than 120 characters long.'
18 export const VIDEO_PRIVACY = {
19 VALIDATORS: [ Validators.required ],
21 'required': 'Video privacy is required.'
25 export const VIDEO_CATEGORY = {
30 export const VIDEO_LICENCE = {
35 export const VIDEO_LANGUAGE = {
40 export const VIDEO_CHANNEL = {
41 VALIDATORS: [ Validators.required ],
43 'required': 'Video channel is required.'
47 export const VIDEO_DESCRIPTION = {
48 VALIDATORS: [ Validators.minLength(3), Validators.maxLength(3000) ],
50 'minlength': 'Video description must be at least 3 characters long.',
51 'maxlength': 'Video description cannot be more than 3000 characters long.'
55 export const VIDEO_TAGS = {
56 VALIDATORS: [ Validators.minLength(2), Validators.maxLength(30) ],
58 'minlength': 'A tag should be more than 2 characters long.',
59 'maxlength': 'A tag should be less than 30 characters long.'