]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/shared/forms/form-validators/custom-config.ts
Add new name/terms/description config options
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / forms / form-validators / custom-config.ts
CommitLineData
fd206f0b
C
1import { Validators } from '@angular/forms'
2
66b16caf
C
3export const INSTANCE_NAME = {
4 VALIDATORS: [ Validators.required ],
5 MESSAGES: {
6 'required': 'Instance name is required.',
7 }
8}
9
fd206f0b
C
10export const CACHE_PREVIEWS_SIZE = {
11 VALIDATORS: [ Validators.required, Validators.min(1), Validators.pattern('[0-9]+') ],
12 MESSAGES: {
13 'required': 'Preview cache size is required.',
14 'min': 'Preview cache size must be greater than 1.',
15 'pattern': 'Preview cache size must be a number.'
16 }
17}
18
19export const SIGNUP_LIMIT = {
20 VALIDATORS: [ Validators.required, Validators.min(1), Validators.pattern('[0-9]+') ],
21 MESSAGES: {
22 'required': 'Signup limit is required.',
23 'min': 'Signup limit must be greater than 1.',
24 'pattern': 'Preview cache size must be a number.'
25 }
26}
27
28export const ADMIN_EMAIL = {
29 VALIDATORS: [ Validators.required, Validators.email ],
30 MESSAGES: {
31 'required': 'Admin email is required.',
32 'email': 'Admin email must be valid.'
33 }
34}
35
36export const TRANSCODING_THREADS = {
37 VALIDATORS: [ Validators.required, Validators.min(1) ],
38 MESSAGES: {
39 'required': 'Transcoding threads is required.',
40 'min': 'Transcoding threads must be greater than 1.'
41 }
42}