]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/shared/forms/form-validators/video-channel.ts
Fix video channel description/support max length
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / forms / form-validators / video-channel.ts
CommitLineData
08c1efbe
C
1import { Validators } from '@angular/forms'
2
3export const VIDEO_CHANNEL_DISPLAY_NAME = {
4 VALIDATORS: [
5 Validators.required,
6 Validators.minLength(3),
7 Validators.maxLength(120)
8 ],
9 MESSAGES: {
10 'required': 'Display name is required.',
11 'minlength': 'Display name must be at least 3 characters long.',
12 'maxlength': 'Display name cannot be more than 120 characters long.'
13 }
14}
15export const VIDEO_CHANNEL_DESCRIPTION = {
16 VALIDATORS: [
17 Validators.minLength(3),
a10fc78b 18 Validators.maxLength(500)
08c1efbe
C
19 ],
20 MESSAGES: {
21 'minlength': 'Description must be at least 3 characters long.',
a10fc78b 22 'maxlength': 'Description cannot be more than 500 characters long.'
08c1efbe
C
23 }
24}
25export const VIDEO_CHANNEL_SUPPORT = {
26 VALIDATORS: [
27 Validators.minLength(3),
a10fc78b 28 Validators.maxLength(500)
08c1efbe
C
29 ],
30 MESSAGES: {
31 'minlength': 'Support text must be at least 3 characters long.',
a10fc78b 32 'maxlength': 'Support text cannot be more than 500 characters long.'
08c1efbe
C
33 }
34}