From e6527e0102f459e9cb766f2c412a6ca00f3be6be Mon Sep 17 00:00:00 2001 From: Johnson Mao <86179381+JohnsonMao@users.noreply.github.com> Date: Sun, 17 Nov 2024 13:12:38 +0800 Subject: [PATCH] fix(group): participator regex --- components/Group/Form/useGroupForm.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/Group/Form/useGroupForm.jsx b/components/Group/Form/useGroupForm.jsx index f3fba09..1067cd2 100644 --- a/components/Group/Form/useGroupForm.jsx +++ b/components/Group/Form/useGroupForm.jsx @@ -57,7 +57,7 @@ const rules = { .min(1, '請選擇學習領域'), participator: z .string() - .regex(/^(100|[1-9]?\d)$/, '請輸入整數,需大於 0,不可超過 100'), + .regex(/^(100|[1-9]\d|[1-9])$/, '請輸入整數,需大於 0,不可超過 100'), area: z .array(z.enum(AREAS.concat({ label: '待討論' }).map(({ label }) => label))) .min(1, '請選擇地點'),