aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/forms/form-validators/custom-config.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-06-05 15:01:45 +0200
committerChocobozzz <me@florianbigard.com>2018-06-05 15:02:27 +0200
commite309822b93d9b69f30cbe830ef3d09dfdb2c13b2 (patch)
tree41dbc3b3108ced7fdba4062974e568695c30e486 /client/src/app/shared/forms/form-validators/custom-config.ts
parentd4d5853e65e584ca51c718f8df590b987f981047 (diff)
downloadPeerTube-e309822b93d9b69f30cbe830ef3d09dfdb2c13b2.tar.gz
PeerTube-e309822b93d9b69f30cbe830ef3d09dfdb2c13b2.tar.zst
PeerTube-e309822b93d9b69f30cbe830ef3d09dfdb2c13b2.zip
Add form validator translations
Diffstat (limited to 'client/src/app/shared/forms/form-validators/custom-config.ts')
-rw-r--r--client/src/app/shared/forms/form-validators/custom-config.ts56
1 files changed, 0 insertions, 56 deletions
diff --git a/client/src/app/shared/forms/form-validators/custom-config.ts b/client/src/app/shared/forms/form-validators/custom-config.ts
deleted file mode 100644
index e3d9a4c7b..000000000
--- a/client/src/app/shared/forms/form-validators/custom-config.ts
+++ /dev/null
@@ -1,56 +0,0 @@
1import { Validators } from '@angular/forms'
2
3export const INSTANCE_NAME = {
4 VALIDATORS: [ Validators.required ],
5 MESSAGES: {
6 'required': 'Instance name is required.'
7 }
8}
9
10export const INSTANCE_SHORT_DESCRIPTION = {
11 VALIDATORS: [ Validators.max(250) ],
12 MESSAGES: {
13 'max': 'Short description should not be longer than 250 characters.'
14 }
15}
16
17export const SERVICES_TWITTER_USERNAME = {
18 VALIDATORS: [ Validators.required ],
19 MESSAGES: {
20 'required': 'Twitter username is required.'
21 }
22}
23
24export const CACHE_PREVIEWS_SIZE = {
25 VALIDATORS: [ Validators.required, Validators.min(1), Validators.pattern('[0-9]+') ],
26 MESSAGES: {
27 'required': 'Preview cache size is required.',
28 'min': 'Preview cache size must be greater than 1.',
29 'pattern': 'Preview cache size must be a number.'
30 }
31}
32
33export const SIGNUP_LIMIT = {
34 VALIDATORS: [ Validators.required, Validators.min(1), Validators.pattern('[0-9]+') ],
35 MESSAGES: {
36 'required': 'Signup limit is required.',
37 'min': 'Signup limit must be greater than 1.',
38 'pattern': 'Preview cache size must be a number.'
39 }
40}
41
42export const ADMIN_EMAIL = {
43 VALIDATORS: [ Validators.required, Validators.email ],
44 MESSAGES: {
45 'required': 'Admin email is required.',
46 'email': 'Admin email must be valid.'
47 }
48}
49
50export const TRANSCODING_THREADS = {
51 VALIDATORS: [ Validators.required, Validators.min(1) ],
52 MESSAGES: {
53 'required': 'Transcoding threads is required.',
54 'min': 'Transcoding threads must be greater than 1.'
55 }
56}