From a09491bc87cb6028702afde043b7c495767309d9 Mon Sep 17 00:00:00 2001 From: Urvish Date: Thu, 29 Oct 2026 13:04:24 +0530 Subject: [PATCH] bug-fix: added country wise phone number length restrictions --- .git_store_info | 4 ++-- src/components/auth/AuthModal.tsx | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.git_store_info b/.git_store_info index c8523f4..df9042a 100644 --- a/.git_store_info +++ b/.git_store_info @@ -1,2 +1,2 @@ -Branch: main -Commit: 75acd1de923fe310458333b66b71450f444eee2b +Branch: phone-code +Commit: 57cf92f4a68510b598927e96163f4cce5d75c309 diff --git a/src/components/auth/AuthModal.tsx b/src/components/auth/AuthModal.tsx index 137fe37..9188821 100644 --- a/src/components/auth/AuthModal.tsx +++ b/src/components/auth/AuthModal.tsx @@ -298,6 +298,7 @@ export const AuthModal: React.FC = ({ const rule = getCountryRuleByDialCode(newCode); if (rule && rule.country !== 'Other') { setAuthCountry(rule.country); + setAuthPhone(cleanPhoneInput(authPhone, rule.maxLength, false)); } }} className="w-[90px] bg-slate-950 border border-slate-800 rounded-xl px-3 py-2.5 text-sm font-semibold text-white focus:outline-none focus:border-indigo-500 appearance-none" @@ -341,6 +342,7 @@ export const AuthModal: React.FC = ({ const rule = getCountryRuleByName(newCountry); if (rule) { setAuthDialCode(rule.code); + setAuthPhone(cleanPhoneInput(authPhone, rule.maxLength, false)); } }} className="w-full bg-slate-950 border border-slate-800 rounded-xl px-4 py-2.5 text-sm font-semibold text-white focus:outline-none focus:border-indigo-500 appearance-none" -- 2.34.1