aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/forms/form-validators/video.ts
blob: 9ecbbbd6028c40e26f6bcea6574998eefca8dc71 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
import { Validators } from '@angular/forms'

export const VIDEO_NAME = {
  VALIDATORS: [ Validators.required, Validators.minLength(3), Validators.maxLength(120) ],
  MESSAGES: {
    'required': 'Video name is required.',
    'minlength': 'Video name must be at least 3 characters long.',
    'maxlength': 'Video name cannot be more than 120 characters long.'
  }
}

export const VIDEO_PRIVACY = {
  VALIDATORS: [ Validators.required ],
  MESSAGES: {
    'required': 'Video privacy is required.'
  }
}

export const VIDEO_CATEGORY = {
  VALIDATORS: [ ],
  MESSAGES: {}
}

export const VIDEO_LICENCE = {
  VALIDATORS: [ ],
  MESSAGES: {}
}

export const VIDEO_LANGUAGE = {
  VALIDATORS: [ ],
  MESSAGES: {}
}

export const VIDEO_IMAGE = {
  VALIDATORS: [ ],
  MESSAGES: {}
}

export const VIDEO_CHANNEL = {
  VALIDATORS: [ Validators.required ],
  MESSAGES: {
    'required': 'Video channel is required.'
  }
}

export const VIDEO_DESCRIPTION = {
  VALIDATORS: [ Validators.minLength(3), Validators.maxLength(10000) ],
  MESSAGES: {
    'minlength': 'Video description must be at least 3 characters long.',
    'maxlength': 'Video description cannot be more than 10000 characters long.'
  }
}

export const VIDEO_TAGS = {
  VALIDATORS: [ Validators.minLength(2), Validators.maxLength(30) ],
  MESSAGES: {
    'minlength': 'A tag should be more than 2 characters long.',
    'maxlength': 'A tag should be less than 30 characters long.'
  }
}

export const VIDEO_SUPPORT = {
  VALIDATORS: [ Validators.minLength(3), Validators.maxLength(300) ],
  MESSAGES: {
    'minlength': 'Video support must be at least 3 characters long.',
    'maxlength': 'Video support cannot be more than 300 characters long.'
  }
}