]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/shared/forms/form-validators/video.ts
Add ability to update some configuration keys
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / forms / form-validators / video.ts
1 import { Validators } from '@angular/forms'
2
3 export const VIDEO_NAME = {
4 VALIDATORS: [ Validators.required, Validators.minLength(3), Validators.maxLength(120) ],
5 MESSAGES: {
6 'required': 'Video name is required.',
7 'minlength': 'Video name must be at least 3 characters long.',
8 'maxlength': 'Video name cannot be more than 120 characters long.'
9 }
10 }
11
12 export const VIDEO_PRIVACY = {
13 VALIDATORS: [ Validators.required ],
14 MESSAGES: {
15 'required': 'Video privacy is required.'
16 }
17 }
18
19 export const VIDEO_CATEGORY = {
20 VALIDATORS: [ ],
21 MESSAGES: {}
22 }
23
24 export const VIDEO_LICENCE = {
25 VALIDATORS: [ ],
26 MESSAGES: {}
27 }
28
29 export const VIDEO_LANGUAGE = {
30 VALIDATORS: [ ],
31 MESSAGES: {}
32 }
33
34 export const VIDEO_CHANNEL = {
35 VALIDATORS: [ Validators.required ],
36 MESSAGES: {
37 'required': 'Video channel is required.'
38 }
39 }
40
41 export const VIDEO_DESCRIPTION = {
42 VALIDATORS: [ Validators.minLength(3), Validators.maxLength(3000) ],
43 MESSAGES: {
44 'minlength': 'Video description must be at least 3 characters long.',
45 'maxlength': 'Video description cannot be more than 3000 characters long.'
46 }
47 }
48
49 export const VIDEO_TAGS = {
50 VALIDATORS: [ Validators.minLength(2), Validators.maxLength(30) ],
51 MESSAGES: {
52 'minlength': 'A tag should be more than 2 characters long.',
53 'maxlength': 'A tag should be less than 30 characters long.'
54 }
55 }