From f4473cf312d09a53a57312745963aee334e251cb Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Fri, 17 Mar 2017 12:42:23 -0400 Subject: PLT-5943 Reduce minimum username length (#5798) --- model/user.go | 2 +- model/user_test.go | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'model') diff --git a/model/user.go b/model/user.go index f380a7550..d62ccccd1 100644 --- a/model/user.go +++ b/model/user.go @@ -36,7 +36,7 @@ const ( USER_LAST_NAME_MAX_RUNES = 64 USER_AUTH_DATA_MAX_LENGTH = 128 USER_NAME_MAX_LENGTH = 64 - USER_NAME_MIN_LENGTH = 3 + USER_NAME_MIN_LENGTH = 1 ) type User struct { diff --git a/model/user_test.go b/model/user_test.go index 542d15e5d..47ec38dbf 100644 --- a/model/user_test.go +++ b/model/user_test.go @@ -189,7 +189,8 @@ var usernames = []struct { expected bool }{ {"spin-punch", true}, - {"sp", false}, + {"sp", true}, + {"s", true}, {"1spin-punch", false}, {"-spin-punch", false}, {".spin-punch", false}, -- cgit v1.2.3-1-g7c22