1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-03 09:49:20 +02:00

Usernames are case insensitive now

This commit is contained in:
Chocobozzz 2017-11-04 18:32:38 +01:00
parent f735448395
commit 563d032e97
No known key found for this signature in database
GPG key ID: 583A612D890159BE
4 changed files with 23 additions and 5 deletions

View file

@ -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) {