1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
import { Validators } from '@angular/forms'
export const INSTANCE_NAME = {
VALIDATORS: [ Validators.required ],
MESSAGES: {
'required': 'Instance name is required.'
}
}
export const INSTANCE_SHORT_DESCRIPTION = {
VALIDATORS: [ Validators.max(250) ],
MESSAGES: {
'max': 'Short description should not be longer than 250 characters.'
}
}
export const SERVICES_TWITTER_USERNAME = {
VALIDATORS: [ Validators.required ],
MESSAGES: {
'required': 'Twitter username is required.'
}
}
export const CACHE_PREVIEWS_SIZE = {
VALIDATORS: [ Validators.required, Validators.min(1), Validators.pattern('[0-9]+') ],
MESSAGES: {
'required': 'Preview cache size is required.',
'min': 'Preview cache size must be greater than 1.',
'pattern': 'Preview cache size must be a number.'
}
}
export const SIGNUP_LIMIT = {
VALIDATORS: [ Validators.required, Validators.min(1), Validators.pattern('[0-9]+') ],
MESSAGES: {
'required': 'Signup limit is required.',
'min': 'Signup limit must be greater than 1.',
'pattern': 'Preview cache size must be a number.'
}
}
export const ADMIN_EMAIL = {
VALIDATORS: [ Validators.required, Validators.email ],
MESSAGES: {
'required': 'Admin email is required.',
'email': 'Admin email must be valid.'
}
}
export const TRANSCODING_THREADS = {
VALIDATORS: [ Validators.required, Validators.min(1) ],
MESSAGES: {
'required': 'Transcoding threads is required.',
'min': 'Transcoding threads must be greater than 1.'
}
}
|