From 563d032e97cc62de50281e6413a8a03ed37a3d3b Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Sat, 4 Nov 2017 18:32:38 +0100 Subject: Usernames are case insensitive now --- server/helpers/custom-validators/users.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'server/helpers') diff --git a/server/helpers/custom-validators/users.ts b/server/helpers/custom-validators/users.ts index f423d6317..b5b5642d6 100644 --- a/server/helpers/custom-validators/users.ts +++ b/server/helpers/custom-validators/users.ts @@ -18,7 +18,7 @@ function isUserVideoQuotaValid (value: string) { function isUserUsernameValid (value: string) { const max = USERS_CONSTRAINTS_FIELDS.USERNAME.max const min = USERS_CONSTRAINTS_FIELDS.USERNAME.min - return exists(value) && validator.matches(value, new RegExp(`^[a-zA-Z0-9._]{${min},${max}}$`)) + return exists(value) && validator.matches(value, new RegExp(`^[a-z0-9._]{${min},${max}}$`)) } function isUserDisplayNSFWValid (value: any) { -- cgit v1.2.3