]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/shared/forms/form-validators/custom-config.ts
Add support to video support on client
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / forms / form-validators / custom-config.ts
1 import { Validators } from '@angular/forms'
2
3 export const INSTANCE_NAME = {
4 VALIDATORS: [ Validators.required ],
5 MESSAGES: {
6 'required': 'Instance name is required.'
7 }
8 }
9
10 export 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
19 export 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
28 export 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
36 export 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 }