mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-09-08 12:16:12 -05:00
Only allow numbers as discrim (#1085)
This commit is contained in:
@@ -96,7 +96,11 @@ const userEditActionSchema = z
|
||||
),
|
||||
inGameNameDiscriminator: z.preprocess(
|
||||
falsyToNull,
|
||||
z.string().length(USER.IN_GAME_NAME_DISCRIMINATOR_LENGTH).nullable()
|
||||
z
|
||||
.string()
|
||||
.length(USER.IN_GAME_NAME_DISCRIMINATOR_LENGTH)
|
||||
.refine((val) => /^[0-9]{4}$/.test(val))
|
||||
.nullable()
|
||||
),
|
||||
})
|
||||
.refine(
|
||||
|
||||
Reference in New Issue
Block a user