From d23e6a1c97a6ae3ca8d340a8c9adad268a5be57e Mon Sep 17 00:00:00 2001 From: BRAINS YUM <43896676+McFlat@users.noreply.github.com> Date: Fri, 19 Oct 2018 01:54:01 -0500 Subject: Feature/description support fields length 1000 (#1267) * fix migrations to not use config constant values as it can introduce bugs later when they change; (fixes #1259) remove constant fields imports from migrations * add migrations to update description and support fields to 1000 (fixes #1258) * fix client/server account and video_channel description/support fields to be max len 1000 (fixes #1258); fix test Should fail with a too long description; fix test Should fail with a long description; fix test Should fail with a long description; Remove USER.SUPPORT from constants since that field no longer exists; null not false, in migrations/0280-description-support.ts; video support field 1000, oops; * rename migration 0280-description-support.ts -> 0285-description-support.ts; update video support maxlength text --- .../app/shared/forms/form-validators/user-validators.service.ts | 4 ++-- .../forms/form-validators/video-channel-validators.service.ts | 8 ++++---- .../app/shared/forms/form-validators/video-validators.service.ts | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) (limited to 'client') diff --git a/client/src/app/shared/forms/form-validators/user-validators.service.ts b/client/src/app/shared/forms/form-validators/user-validators.service.ts index 1fd1cdf68..d14fa4777 100644 --- a/client/src/app/shared/forms/form-validators/user-validators.service.ts +++ b/client/src/app/shared/forms/form-validators/user-validators.service.ts @@ -101,11 +101,11 @@ export class UserValidatorsService { this.USER_DESCRIPTION = { VALIDATORS: [ Validators.minLength(3), - Validators.maxLength(250) + Validators.maxLength(1000) ], MESSAGES: { 'minlength': this.i18n('Description must be at least 3 characters long.'), - 'maxlength': this.i18n('Description cannot be more than 250 characters long.') + 'maxlength': this.i18n('Description cannot be more than 1000 characters long.') } } diff --git a/client/src/app/shared/forms/form-validators/video-channel-validators.service.ts b/client/src/app/shared/forms/form-validators/video-channel-validators.service.ts index 1ce3a0dca..f62ff65f7 100644 --- a/client/src/app/shared/forms/form-validators/video-channel-validators.service.ts +++ b/client/src/app/shared/forms/form-validators/video-channel-validators.service.ts @@ -42,22 +42,22 @@ export class VideoChannelValidatorsService { this.VIDEO_CHANNEL_DESCRIPTION = { VALIDATORS: [ Validators.minLength(3), - Validators.maxLength(500) + Validators.maxLength(1000) ], MESSAGES: { 'minlength': i18n('Description must be at least 3 characters long.'), - 'maxlength': i18n('Description cannot be more than 500 characters long.') + 'maxlength': i18n('Description cannot be more than 1000 characters long.') } } this.VIDEO_CHANNEL_SUPPORT = { VALIDATORS: [ Validators.minLength(3), - Validators.maxLength(500) + Validators.maxLength(1000) ], MESSAGES: { 'minlength': i18n('Support text must be at least 3 characters long.'), - 'maxlength': i18n('Support text cannot be more than 500 characters long.') + 'maxlength': i18n('Support text cannot be more than 1000 characters long.') } } } diff --git a/client/src/app/shared/forms/form-validators/video-validators.service.ts b/client/src/app/shared/forms/form-validators/video-validators.service.ts index 396be6f3b..81ed0666f 100644 --- a/client/src/app/shared/forms/form-validators/video-validators.service.ts +++ b/client/src/app/shared/forms/form-validators/video-validators.service.ts @@ -79,10 +79,10 @@ export class VideoValidatorsService { } this.VIDEO_SUPPORT = { - VALIDATORS: [ Validators.minLength(3), Validators.maxLength(500) ], + VALIDATORS: [ Validators.minLength(3), Validators.maxLength(1000) ], MESSAGES: { 'minlength': this.i18n('Video support must be at least 3 characters long.'), - 'maxlength': this.i18n('Video support cannot be more than 500 characters long.') + 'maxlength': this.i18n('Video support cannot be more than 1000 characters long.') } } -- cgit v1.2.3