]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/shared/forms/form-validators/video.ts
Add about page
[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
bcd9f81e
C
34export const VIDEO_CHANNEL = {
35 VALIDATORS: [ Validators.required ],
36 MESSAGES: {
37 'required': 'Video channel is required.'
38 }
39}
40
4b2f33f3 41export const VIDEO_DESCRIPTION = {
cadb46d8 42 VALIDATORS: [ Validators.minLength(3), Validators.maxLength(3000) ],
4b2f33f3 43 MESSAGES: {
4b2f33f3 44 'minlength': 'Video description must be at least 3 characters long.',
2de96f4d 45 'maxlength': 'Video description cannot be more than 3000 characters long.'
4b2f33f3 46 }
df98563e 47}
4b2f33f3
C
48
49export const VIDEO_TAGS = {
a265f7f3 50 VALIDATORS: [ Validators.minLength(2), Validators.maxLength(30) ],
4b2f33f3 51 MESSAGES: {
3758da94 52 'minlength': 'A tag should be more than 2 characters long.',
a265f7f3 53 'maxlength': 'A tag should be less than 30 characters long.'
4b2f33f3 54 }
df98563e 55}