aboutsummaryrefslogtreecommitdiffhomepage
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/src/app/shared/form-validators/video-validators.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/client/src/app/shared/form-validators/video-validators.ts b/client/src/app/shared/form-validators/video-validators.ts
index 23f2391b2..b3ce876b1 100644
--- a/client/src/app/shared/form-validators/video-validators.ts
+++ b/client/src/app/shared/form-validators/video-validators.ts
@@ -64,7 +64,7 @@ export const VIDEO_TAGS_ARRAY_VALIDATOR: BuildFormValidator = {
64 VALIDATORS: [ Validators.maxLength(5), arrayTagLengthValidator() ], 64 VALIDATORS: [ Validators.maxLength(5), arrayTagLengthValidator() ],
65 MESSAGES: { 65 MESSAGES: {
66 'maxlength': $localize`A maximum of 5 tags can be used on a video.`, 66 'maxlength': $localize`A maximum of 5 tags can be used on a video.`,
67 'arrayTagLength': $localize`A tag should be more than 2, and less than 30 characters long.` 67 'arrayTagLength': $localize`A tag should be more than 1 and less than 30 characters long.`
68 } 68 }
69} 69}
70 70
@@ -92,7 +92,7 @@ function arrayTagLengthValidator (min = 2, max = 30): ValidatorFn {
92 return (control: AbstractControl): ValidationErrors => { 92 return (control: AbstractControl): ValidationErrors => {
93 const array = control.value as Array<string> 93 const array = control.value as Array<string>
94 94
95 if (array.every(e => e.length > min && e.length < max)) { 95 if (array.every(e => e.length >= min && e.length <= max)) {
96 return null 96 return null
97 } 97 }
98 98