aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-02-10 11:42:10 +0100
committerChocobozzz <me@florianbigard.com>2021-02-10 11:42:10 +0100
commit4e55c132a007aa5466e1ac95a998df3ca88f3fb7 (patch)
tree845f51d40432be80e1cb464046c0b0559ee8aa89 /client/src/app/shared
parent4e9835e63260aa6c2b7ce233de83a53f19563581 (diff)
downloadPeerTube-4e55c132a007aa5466e1ac95a998df3ca88f3fb7.tar.gz
PeerTube-4e55c132a007aa5466e1ac95a998df3ca88f3fb7.tar.zst
PeerTube-4e55c132a007aa5466e1ac95a998df3ca88f3fb7.zip
Add missing live config validators
Diffstat (limited to 'client/src/app/shared')
-rw-r--r--client/src/app/shared/form-validators/custom-config-validators.ts24
1 files changed, 24 insertions, 0 deletions
diff --git a/client/src/app/shared/form-validators/custom-config-validators.ts b/client/src/app/shared/form-validators/custom-config-validators.ts
index 23f2156c2..d6ce6db22 100644
--- a/client/src/app/shared/form-validators/custom-config-validators.ts
+++ b/client/src/app/shared/form-validators/custom-config-validators.ts
@@ -65,6 +65,30 @@ export const TRANSCODING_THREADS_VALIDATOR: BuildFormValidator = {
65 } 65 }
66} 66}
67 67
68export const MAX_LIVE_DURATION_VALIDATOR: BuildFormValidator = {
69 VALIDATORS: [Validators.required, Validators.min(-1)],
70 MESSAGES: {
71 'required': $localize`Max live duration is required.`,
72 'min': $localize`Max live duration should be greater or equal to -1.`
73 }
74}
75
76export const MAX_INSTANCE_LIVES_VALIDATOR: BuildFormValidator = {
77 VALIDATORS: [Validators.required, Validators.min(-1)],
78 MESSAGES: {
79 'required': $localize`Max instance lives is required.`,
80 'min': $localize`Max instance lives should be greater or equal to -1.`
81 }
82}
83
84export const MAX_USER_LIVES_VALIDATOR: BuildFormValidator = {
85 VALIDATORS: [Validators.required, Validators.min(-1)],
86 MESSAGES: {
87 'required': $localize`Max user lives is required.`,
88 'min': $localize`Max user lives should be greater or equal to -1.`
89 }
90}
91
68export const CONCURRENCY_VALIDATOR: BuildFormValidator = { 92export const CONCURRENCY_VALIDATOR: BuildFormValidator = {
69 VALIDATORS: [Validators.required, Validators.min(1)], 93 VALIDATORS: [Validators.required, Validators.min(1)],
70 MESSAGES: { 94 MESSAGES: {