]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/shared/forms/form-validators/video.ts
Add support to video support on client
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / forms / form-validators / video.ts
CommitLineData
df98563e 1import { Validators } from '@angular/forms'
4b2f33f3
C
2
3export const VIDEO_NAME = {
a265f7f3 4 VALIDATORS: [ Validators.required, Validators.minLength(3), Validators.maxLength(120) ],
4b2f33f3
C
5 MESSAGES: {
6 'required': 'Video name is required.',
7 'minlength': 'Video name must be at least 3 characters long.',
a265f7f3 8 'maxlength': 'Video name cannot be more than 120 characters long.'
4b2f33f3 9 }
df98563e 10}
d07137b9 11
fd45e8f4
C
12export const VIDEO_PRIVACY = {
13 VALIDATORS: [ Validators.required ],
14 MESSAGES: {
15 'required': 'Video privacy is required.'
16 }
17}
18
6e07c3de 19export const VIDEO_CATEGORY = {
cadb46d8
C
20 VALIDATORS: [ ],
21 MESSAGES: {}
df98563e 22}
d07137b9
C
23
24export const VIDEO_LICENCE = {
cadb46d8
C
25 VALIDATORS: [ ],
26 MESSAGES: {}
df98563e 27}
d07137b9 28
db216afd
C
29export const VIDEO_LANGUAGE = {
30 VALIDATORS: [ ],
31 MESSAGES: {}
df98563e 32}
db216afd 33
6de36768
C
34export const VIDEO_IMAGE = {
35 VALIDATORS: [ ],
36 MESSAGES: {}
37}
38
bcd9f81e
C
39export const VIDEO_CHANNEL = {
40 VALIDATORS: [ Validators.required ],
41 MESSAGES: {
42 'required': 'Video channel is required.'
43 }
44}
45
4b2f33f3 46export const VIDEO_DESCRIPTION = {
07fa4c97 47 VALIDATORS: [ Validators.minLength(3), Validators.maxLength(10000) ],
4b2f33f3 48 MESSAGES: {
4b2f33f3 49 'minlength': 'Video description must be at least 3 characters long.',
07fa4c97 50 'maxlength': 'Video description cannot be more than 10000 characters long.'
4b2f33f3 51 }
df98563e 52}
4b2f33f3
C
53
54export const VIDEO_TAGS = {
a265f7f3 55 VALIDATORS: [ Validators.minLength(2), Validators.maxLength(30) ],
4b2f33f3 56 MESSAGES: {
3758da94 57 'minlength': 'A tag should be more than 2 characters long.',
a265f7f3 58 'maxlength': 'A tag should be less than 30 characters long.'
4b2f33f3 59 }
df98563e 60}
07fa4c97
C
61
62export const VIDEO_SUPPORT = {
63 VALIDATORS: [ Validators.minLength(3), Validators.maxLength(300) ],
64 MESSAGES: {
65 'minlength': 'Video support must be at least 3 characters long.',
66 'maxlength': 'Video support cannot be more than 300 characters long.'
67 }
68}