fix: correct phone number formatting to follow standard pattern
TaxBaik CI/CD / build-and-deploy (push) Successful in 3m32s

- 10-digit numbers: XXXX-XXX-XXXX (4-3-3) - landline format
- 11-digit numbers: XXX-XXXX-XXXX (3-4-4) - mobile format

Apply consistent formatting on both frontend and backend.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-07-04 02:41:55 +09:00
parent 11019c7e0b
commit caf7e5cf9f
2 changed files with 6 additions and 4 deletions
@@ -160,8 +160,8 @@ public class InquiryService(
return clean.Length switch
{
10 => $"{clean[..3]}-{clean[3..6]}-{clean[6..]}", // 01012345678 → 010-123-45678
11 => $"{clean[..3]}-{clean[3..7]}-{clean[7..]}", // 010123456789 → 010-1234-56789
10 => $"{clean[..4]}-{clean[4..7]}-{clean[7..]}", // 0089702448 → 0089-702-2448
11 => $"{clean[..3]}-{clean[3..7]}-{clean[7..]}", // 01012345678 → 010-1234-5678
_ => clean
};
}
+4 -2
View File
@@ -98,11 +98,13 @@
value = value.substring(0, 11); // 최대 11자리
}
// 포맷팅: XXX-XXXX-XXXX 또는 XXX-XXX-XXXX
// 포맷팅
if (value.length >= 10) {
if (value.length === 10) {
value = `${value.substring(0, 3)}-${value.substring(3, 6)}-${value.substring(6)}`;
// 10자리: XXXX-XXX-XXXX
value = `${value.substring(0, 4)}-${value.substring(4, 7)}-${value.substring(7)}`;
} else if (value.length === 11) {
// 11자리: XXX-XXXX-XXXX
value = `${value.substring(0, 3)}-${value.substring(3, 7)}-${value.substring(7)}`;
}
} else if (value.length > 3) {