bug-fix: added country wise phone number length restrictions

This commit is contained in:
Urvish Prajapati 2026-10-29 13:04:24 +05:30
parent 57cf92f4a6
commit a09491bc87
2 changed files with 4 additions and 2 deletions

View File

@ -1,2 +1,2 @@
Branch: main
Commit: 75acd1de923fe310458333b66b71450f444eee2b
Branch: phone-code
Commit: 57cf92f4a68510b598927e96163f4cce5d75c309

View File

@ -298,6 +298,7 @@ export const AuthModal: React.FC<AuthModalProps> = ({
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<AuthModalProps> = ({
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"