mirror of
https://github.com/ktds-dg0501/kt-event-marketing.git
synced 2025-12-06 08:46:23 +00:00
프로토~ 4
This commit is contained in:
parent
0f1ac11982
commit
c6621ff151
Binary file not shown.
|
After Width: | Height: | Size: 44 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 51 KiB |
@ -144,9 +144,10 @@
|
||||
id="businessNumber"
|
||||
name="businessNumber"
|
||||
class="form-input"
|
||||
placeholder="123-45-67890"
|
||||
placeholder="숫자만 입력하세요 (예: 1234567890)"
|
||||
required
|
||||
maxlength="12"
|
||||
inputmode="numeric"
|
||||
style="flex: 1;"
|
||||
autocomplete="off"
|
||||
>
|
||||
@ -160,6 +161,9 @@
|
||||
검증하기
|
||||
</button>
|
||||
</div>
|
||||
<div class="body-s text-muted" style="margin-top: 4px;">
|
||||
숫자만 입력하시면 자동으로 형식이 맞춰집니다
|
||||
</div>
|
||||
<div id="verifyResult" style="margin-top: 8px;"></div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
9
design/uiux/prototype/js/common.js
vendored
9
design/uiux/prototype/js/common.js
vendored
@ -509,8 +509,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
// 사업자번호 필드
|
||||
if (input.name === 'business_number' && input.value) {
|
||||
// 사업자번호 필드 (name이 businessNumber인 경우도 처리)
|
||||
if ((input.name === 'business_number' || input.name === 'businessNumber') && input.value) {
|
||||
// 자동 하이픈 추가
|
||||
let value = input.value.replace(/[^0-9]/g, '');
|
||||
if (value.length > 3 && value.length <= 5) {
|
||||
@ -520,13 +520,16 @@
|
||||
}
|
||||
input.value = value;
|
||||
|
||||
// 검증
|
||||
// 검증 (완전한 형식일 때만)
|
||||
if (value.length === 12) {
|
||||
if (!window.FormValidator.isValidBusinessNumber(value)) {
|
||||
window.FormValidator.showError(input, '올바른 사업자번호 형식을 입력하세요.');
|
||||
} else {
|
||||
window.FormValidator.clearError(input);
|
||||
}
|
||||
} else {
|
||||
// 입력 중일 때는 에러 제거
|
||||
window.FormValidator.clearError(input);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user