diff options
-rw-r--r-- | client/src/app/shared/forms/form-validators/video-comment.ts | 2 | ||||
-rw-r--r-- | server/tests/api/check-params/video-comments.ts | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/client/src/app/shared/forms/form-validators/video-comment.ts b/client/src/app/shared/forms/form-validators/video-comment.ts index 42a97e300..290d83195 100644 --- a/client/src/app/shared/forms/form-validators/video-comment.ts +++ b/client/src/app/shared/forms/form-validators/video-comment.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import { Validators } from '@angular/forms' | 1 | import { Validators } from '@angular/forms' |
2 | 2 | ||
3 | export const VIDEO_COMMENT_TEXT = { | 3 | export const VIDEO_COMMENT_TEXT = { |
4 | VALIDATORS: [ Validators.required, Validators.minLength(2), Validators.maxLength(3000) ], | 4 | VALIDATORS: [ Validators.required, Validators.minLength(1), Validators.maxLength(3000) ], |
5 | MESSAGES: { | 5 | MESSAGES: { |
6 | 'required': 'Comment is required.', | 6 | 'required': 'Comment is required.', |
7 | 'minlength': 'Comment must be at least 2 characters long.', | 7 | 'minlength': 'Comment must be at least 2 characters long.', |
diff --git a/server/tests/api/check-params/video-comments.ts b/server/tests/api/check-params/video-comments.ts index 3fde9bd94..5241832fe 100644 --- a/server/tests/api/check-params/video-comments.ts +++ b/server/tests/api/check-params/video-comments.ts | |||
@@ -117,7 +117,7 @@ describe('Test video comments API validator', function () { | |||
117 | 117 | ||
118 | it('Should fail with a short comment', async function () { | 118 | it('Should fail with a short comment', async function () { |
119 | const fields = { | 119 | const fields = { |
120 | text: 'h'.repeat(3001) | 120 | text: '' |
121 | } | 121 | } |
122 | await makePostBodyRequest({ url: server.url, path: pathThread, token: server.accessToken, fields }) | 122 | await makePostBodyRequest({ url: server.url, path: pathThread, token: server.accessToken, fields }) |
123 | }) | 123 | }) |
@@ -160,7 +160,7 @@ describe('Test video comments API validator', function () { | |||
160 | 160 | ||
161 | it('Should fail with a short comment', async function () { | 161 | it('Should fail with a short comment', async function () { |
162 | const fields = { | 162 | const fields = { |
163 | text: 'h'.repeat(3001) | 163 | text: '' |
164 | } | 164 | } |
165 | await makePostBodyRequest({ url: server.url, path: pathComment, token: server.accessToken, fields }) | 165 | await makePostBodyRequest({ url: server.url, path: pathComment, token: server.accessToken, fields }) |
166 | }) | 166 | }) |