]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/shared/forms/form-validators/video.ts
Fix client compilation
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / forms / form-validators / video.ts
CommitLineData
4b2f33f3
C
1import { Validators } from '@angular/forms';
2
3export const VIDEO_NAME = {
4 VALIDATORS: [ Validators.required, Validators.minLength(3), Validators.maxLength(50) ],
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 50 characters long.'
9 }
10};
d07137b9 11
6e07c3de
C
12export const VIDEO_CATEGORY = {
13 VALIDATORS: [ Validators.required ],
14 MESSAGES: {
15 'required': 'Video category is required.'
16 }
17};
d07137b9
C
18
19export const VIDEO_LICENCE = {
20 VALIDATORS: [ Validators.required ],
21 MESSAGES: {
22 'required': 'Video licence is required.'
23 }
24};
25
db216afd
C
26export const VIDEO_LANGUAGE = {
27 VALIDATORS: [ ],
28 MESSAGES: {}
29};
30
4b2f33f3
C
31export const VIDEO_DESCRIPTION = {
32 VALIDATORS: [ Validators.required, Validators.minLength(3), Validators.maxLength(250) ],
33 MESSAGES: {
34 'required': 'Video description is required.',
35 'minlength': 'Video description must be at least 3 characters long.',
36 'maxlength': 'Video description cannot be more than 250 characters long.'
37 }
38};
39
40export const VIDEO_TAGS = {
3758da94 41 VALIDATORS: [ Validators.minLength(2), Validators.maxLength(10) ],
4b2f33f3 42 MESSAGES: {
3758da94 43 'minlength': 'A tag should be more than 2 characters long.',
e54163c2 44 'maxlength': 'A tag should be less than 10 characters long.'
4b2f33f3
C
45 }
46};