From 061677f2b0338431bbef662fdc375c69a49b388b Mon Sep 17 00:00:00 2001 From: Abhinav Raut Date: Tue, 15 Apr 2025 03:45:54 +0530 Subject: [PATCH] fix: update phone number validation to allow shorter lengths --- frontend/src/features/contact/formSchema.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/features/contact/formSchema.js b/frontend/src/features/contact/formSchema.js index 55e75af8..95fe9b87 100644 --- a/frontend/src/features/contact/formSchema.js +++ b/frontend/src/features/contact/formSchema.js @@ -22,9 +22,9 @@ export const createFormSchema = (t) => z.object({ phone_number: z .string() .optional() - .refine(val => !val || (/^\d{6,15}$/.test(val)), { + .refine(val => !val || (/^\d{1,15}$/.test(val)), { message: t('form.error.minmax', { - min: 6, + min: 1, max: 15, }) })