From b6e2f448c94f9a8d5d041589fc04a495016f51d3 Mon Sep 17 00:00:00 2001 From: "Kalle (Sendou)" <38327916+Sendouc@users.noreply.github.com> Date: Thu, 19 Nov 2020 09:39:16 +0200 Subject: [PATCH] fix profile validator --- lib/validators/profile.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/validators/profile.ts b/lib/validators/profile.ts index 8ceccd874..1267bf6ee 100644 --- a/lib/validators/profile.ts +++ b/lib/validators/profile.ts @@ -15,7 +15,7 @@ const profileRootSchema = z.object({ .string() .max(32) .refine( - (val) => isNaN(Number(val)), + (val) => !val || isNaN(Number(val)), "Name in the custom URL can't only contain numbers" ) .optional()