]>
Commit | Line | Data |
---|---|---|
fd206f0b C |
1 | import { Validators } from '@angular/forms' |
2 | ||
66b16caf C |
3 | export const INSTANCE_NAME = { |
4 | VALIDATORS: [ Validators.required ], | |
5 | MESSAGES: { | |
36f9424f | 6 | 'required': 'Instance name is required.' |
2e3a0215 C |
7 | } |
8 | } | |
9 | ||
10 | export const INSTANCE_SHORT_DESCRIPTION = { | |
11 | VALIDATORS: [ Validators.max(250) ], | |
12 | MESSAGES: { | |
13 | 'max': 'Short description should not be longer than 250 characters.' | |
8be1afa1 C |
14 | } |
15 | } | |
16 | ||
17 | export const SERVICES_TWITTER_USERNAME = { | |
18 | VALIDATORS: [ Validators.required ], | |
19 | MESSAGES: { | |
20 | 'required': 'Twitter username is required.' | |
66b16caf C |
21 | } |
22 | } | |
23 | ||
fd206f0b C |
24 | export 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 | ||
33 | export 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 | ||
42 | export 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 | ||
50 | export 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 | } |