]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/shared/forms/form-validators/video.ts
Design confirm dialog
[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
C
19export const VIDEO_CATEGORY = {
20 VALIDATORS: [ Validators.required ],
21 MESSAGES: {
22 'required': 'Video category is required.'
23 }
df98563e 24}
d07137b9
C
25
26export const VIDEO_LICENCE = {
27 VALIDATORS: [ Validators.required ],
28 MESSAGES: {
29 'required': 'Video licence is required.'
30 }
df98563e 31}
d07137b9 32
db216afd
C
33export const VIDEO_LANGUAGE = {
34 VALIDATORS: [ ],
35 MESSAGES: {}
df98563e 36}
db216afd 37
bcd9f81e
C
38export const VIDEO_CHANNEL = {
39 VALIDATORS: [ Validators.required ],
40 MESSAGES: {
41 'required': 'Video channel is required.'
42 }
43}
44
4b2f33f3 45export const VIDEO_DESCRIPTION = {
2de96f4d 46 VALIDATORS: [ Validators.required, Validators.minLength(3), Validators.maxLength(3000) ],
4b2f33f3
C
47 MESSAGES: {
48 'required': 'Video description is required.',
49 'minlength': 'Video description must be at least 3 characters long.',
2de96f4d 50 'maxlength': 'Video description cannot be more than 3000 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}
bfb3a98f
C
61
62export const VIDEO_FILE = {
63 VALIDATORS: [ Validators.required ],
64 MESSAGES: {
65 'required': 'Video file is required.'
66 }
67}