into advc
This commit is contained in:
hylee 2024-09-03 16:40:15 +09:00
commit 4538a78089

View File

@ -364,6 +364,9 @@ function isValidPhoneNumber(phone) {
// 유효성 후 포맷 맞추는 함수
function formatPhoneNumber(phone) {
if (typeof phone !== 'string') {
phone = String(phone); // phone을 문자열로 변환
}
// 숫자만 남기기
let cleanedPhone = phone.replace(/\D/g, ''); // 모든 숫자가 아닌 문자 제거
// console.log('cleanedPhone : ', cleanedPhone);