mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-03-11 22:23:32 +08:00
better validation
This commit is contained in:
parent
8c377cca58
commit
9d507b67e6
1 changed files with 2 additions and 2 deletions
|
@ -4,10 +4,10 @@ const { roundTo2 } = require("./misc");
|
|||
|
||||
function isUsernameValid(name) {
|
||||
if (name === null || name === undefined || name === "") return false;
|
||||
if (/miodec/.test(name.toLowerCase())) return false;
|
||||
if (/.*miodec.*/.test(name.toLowerCase())) return false;
|
||||
//sorry for the bad words
|
||||
if (
|
||||
/bitly|fuck|bitch|shit|pussy|nigga|niqqa|niqqer|nigger|ni99a|ni99er|niggas|niga|niger|cunt|faggot|retard/.test(
|
||||
/.*(bitly|fuck|bitch|shit|pussy|nigga|niqqa|niqqer|nigger|ni99a|ni99er|niggas|niga|niger|cunt|faggot|retard).*/.test(
|
||||
name.toLowerCase()
|
||||
)
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue