Merge branch 'advc' of http://hylee@vcs.iten.co.kr:9999/hylee/mjon_git
into advc
This commit is contained in:
commit
4538a78089
@ -364,6 +364,9 @@ function isValidPhoneNumber(phone) {
|
|||||||
|
|
||||||
// 유효성 후 포맷 맞추는 함수
|
// 유효성 후 포맷 맞추는 함수
|
||||||
function formatPhoneNumber(phone) {
|
function formatPhoneNumber(phone) {
|
||||||
|
if (typeof phone !== 'string') {
|
||||||
|
phone = String(phone); // phone을 문자열로 변환
|
||||||
|
}
|
||||||
// 숫자만 남기기
|
// 숫자만 남기기
|
||||||
let cleanedPhone = phone.replace(/\D/g, ''); // 모든 숫자가 아닌 문자 제거
|
let cleanedPhone = phone.replace(/\D/g, ''); // 모든 숫자가 아닌 문자 제거
|
||||||
// console.log('cleanedPhone : ', cleanedPhone);
|
// console.log('cleanedPhone : ', cleanedPhone);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user