From d0ce42c1c17054b7e0c5081243152c32ecb1c193 Mon Sep 17 00:00:00 2001 From: BRAINS YUM <43896676+McFlat@users.noreply.github.com> Date: Fri, 7 Dec 2018 07:54:33 -0600 Subject: username/display_name/video_channel_name min length 1 and max length 50 (#1265) * make username, display_name and video_channel_name min length 1 and max length 50; (fixes #1263); ! still some bug on the frontend complains but if you remove the disabled property it creates the account just fine; allow for usernames to start with a number; fix test, since username can be 1 char now make test check empty; fix test, Should fail with a too long username; fix test, Should fail with a too small username; fix regular expression for username and videoChannel; change username, videoChannel to be lowercase and fix message; * change 1 characters to 1 character --- server/initializers/constants.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'server/initializers') diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts index 6b798875c..d4496bc34 100644 --- a/server/initializers/constants.ts +++ b/server/initializers/constants.ts @@ -300,9 +300,9 @@ const CONFIG = { const CONSTRAINTS_FIELDS = { USERS: { - NAME: { min: 3, max: 120 }, // Length + NAME: { min: 1, max: 50 }, // Length DESCRIPTION: { min: 3, max: 1000 }, // Length - USERNAME: { min: 3, max: 20 }, // Length + USERNAME: { min: 1, max: 50 }, // Length PASSWORD: { min: 6, max: 255 }, // Length VIDEO_QUOTA: { min: -1 }, VIDEO_QUOTA_DAILY: { min: -1 }, @@ -316,7 +316,7 @@ const CONSTRAINTS_FIELDS = { REASON: { min: 2, max: 300 } // Length }, VIDEO_CHANNELS: { - NAME: { min: 3, max: 120 }, // Length + NAME: { min: 1, max: 50 }, // Length DESCRIPTION: { min: 3, max: 1000 }, // Length SUPPORT: { min: 3, max: 1000 }, // Length URL: { min: 3, max: 2000 } // Length -- cgit v1.2.3