diff options
Diffstat (limited to 'client/src/app/shared')
-rw-r--r-- | client/src/app/shared/form-validators/custom-config-validators.ts | 24 |
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 | ||
68 | export 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 | |||
76 | export 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 | |||
84 | export 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 | |||
68 | export const CONCURRENCY_VALIDATOR: BuildFormValidator = { | 92 | export const CONCURRENCY_VALIDATOR: BuildFormValidator = { |
69 | VALIDATORS: [Validators.required, Validators.min(1)], | 93 | VALIDATORS: [Validators.required, Validators.min(1)], |
70 | MESSAGES: { | 94 | MESSAGES: { |