summaryrefslogtreecommitdiffstats
path: root/model
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2017-03-17 12:42:23 -0400
committerGeorge Goldberg <george@gberg.me>2017-03-17 16:42:23 +0000
commitf4473cf312d09a53a57312745963aee334e251cb (patch)
tree0832fdd2e291614640f378116dca90ced9faf7c8 /model
parent91d430b2a39a03b052cc103f73f44c68cbc96b2d (diff)
downloadchat-f4473cf312d09a53a57312745963aee334e251cb.tar.gz
chat-f4473cf312d09a53a57312745963aee334e251cb.tar.bz2
chat-f4473cf312d09a53a57312745963aee334e251cb.zip
PLT-5943 Reduce minimum username length (#5798)
Diffstat (limited to 'model')
-rw-r--r--model/user.go2
-rw-r--r--model/user_test.go3
2 files changed, 3 insertions, 2 deletions
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},