From 8d079adaf34831bec456f6c91921d23bed04042a Mon Sep 17 00:00:00 2001 From: MeowcaTheoRange Date: Fri, 20 Oct 2023 20:56:15 -0500 Subject: [PATCH] Allow for numeric first name, unrequire last name --- src/types/client/troll.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/types/client/troll.ts b/src/types/client/troll.ts index bfaa826..5a25ce5 100644 --- a/src/types/client/troll.ts +++ b/src/types/client/troll.ts @@ -11,13 +11,13 @@ export const SubmitTrollSchema = yup yup .string() .required() - .matches(/^[A-z]+$/, "Letters only") + .matches(/^[A-z0-9-_]+$/, "Alphanumeric characters only") .min(3) .max(24) .lowercase(), yup .string() - .required() + .notRequired() .matches(/^[A-z]+$/, "Letters only") .min(3) .max(24) @@ -213,7 +213,7 @@ export const PartialTrollSchema = yup name: yup.tuple([ yup .string() - .matches(/^[A-z]+$/, "Letters only") + .matches(/^[A-z0-9-_]+$/, "Alphanumeric characters only") .min(1) .max(24) .lowercase(),