diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-11-04 18:32:38 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-11-04 18:32:38 +0100 |
commit | 563d032e97cc62de50281e6413a8a03ed37a3d3b (patch) | |
tree | 43f09cc746f8b3b92d9d7b078ae93d2af7c3b032 /server/helpers | |
parent | f73544839586d5e50529617f3649a84ac9e0ab86 (diff) | |
download | PeerTube-563d032e97cc62de50281e6413a8a03ed37a3d3b.tar.gz PeerTube-563d032e97cc62de50281e6413a8a03ed37a3d3b.tar.zst PeerTube-563d032e97cc62de50281e6413a8a03ed37a3d3b.zip |
Usernames are case insensitive now
Diffstat (limited to 'server/helpers')
-rw-r--r-- | server/helpers/custom-validators/users.ts | 2 |
1 files changed, 1 insertions, 1 deletions
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) { | |||
18 | function isUserUsernameValid (value: string) { | 18 | function isUserUsernameValid (value: string) { |
19 | const max = USERS_CONSTRAINTS_FIELDS.USERNAME.max | 19 | const max = USERS_CONSTRAINTS_FIELDS.USERNAME.max |
20 | const min = USERS_CONSTRAINTS_FIELDS.USERNAME.min | 20 | const min = USERS_CONSTRAINTS_FIELDS.USERNAME.min |
21 | return exists(value) && validator.matches(value, new RegExp(`^[a-zA-Z0-9._]{${min},${max}}$`)) | 21 | return exists(value) && validator.matches(value, new RegExp(`^[a-z0-9._]{${min},${max}}$`)) |
22 | } | 22 | } |
23 | 23 | ||
24 | function isUserDisplayNSFWValid (value: any) { | 24 | function isUserDisplayNSFWValid (value: any) { |