From c24e151e1b2eaf8dd3bfc4525558aa5f173a5987 Mon Sep 17 00:00:00 2001 From: Wind-Explorer Date: Thu, 1 Aug 2024 11:27:52 +0800 Subject: [PATCH] fixed town council data bug --- server/routes/users.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/routes/users.js b/server/routes/users.js index a1d610a..61284c9 100644 --- a/server/routes/users.js +++ b/server/routes/users.js @@ -25,6 +25,7 @@ let validationSchema = yup.object({ .trim() .matches(/^[0-9]{8}$/, "Must be exactly 8 digits") .required(), + townCouncil: yup.string().trim().max(30).required(), password: yup.string().trim().max(100).required(), profilePicture: yup.string().trim().max(255), }); @@ -37,6 +38,7 @@ let optionalValidationSchema = yup.object({ .string() .trim() .matches(/^[0-9]{8}$/, "Must be exactly 8 digits"), + townCouncil: yup.string().trim().max(30), password: yup.string().trim().max(100), profilePicture: yup.string().trim().max(255), });