diff options
-rw-r--r-- | api4/user_test.go | 5 | ||||
-rw-r--r-- | i18n/en.json | 8 |
2 files changed, 13 insertions, 0 deletions
diff --git a/api4/user_test.go b/api4/user_test.go index fd60a40ee..6b8b14951 100644 --- a/api4/user_test.go +++ b/api4/user_test.go @@ -69,6 +69,11 @@ func TestCreateUser(t *testing.T) { CheckErrorMessage(t, resp, "model.user.is_valid.email.app_error") CheckBadRequestStatus(t, resp) + ruser.Username = "testinvalid+++" + _, resp = Client.CreateUser(ruser) + CheckErrorMessage(t, resp, "model.user.is_valid.username.app_error") + CheckBadRequestStatus(t, resp) + th.App.UpdateConfig(func(cfg *model.Config) { *cfg.TeamSettings.EnableOpenServer = false }) th.App.UpdateConfig(func(cfg *model.Config) { *cfg.TeamSettings.EnableUserCreation = false }) diff --git a/i18n/en.json b/i18n/en.json index bb71f9fcc..4fd2fa128 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -4707,6 +4707,14 @@ "translation": "Invalid user id" }, { + "id": "model.user.is_valid.email.app_error", + "translation": "Please enter a valid email address." + }, + { + "id": "model.user.is_valid.username.app_error", + "translation": "Username must begin with a letter and contain between 3 and 22 characters including numbers, lowercase letters, and the symbols \".\", \"-\", and \"_\"." + }, + { "id": "model.utils.decode_json.app_error", "translation": "could not decode" }, |