FO 로그인 input 수정
This commit is contained in:
@@ -21,8 +21,8 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="input-field">
|
||||
<input autofocus class="" id="floatingInput" name="username" placeholder="임가번호를 입력해 주세요" value="11111"
|
||||
type="number" maxlength="5">
|
||||
<input autofocus maxlength="5" id="floatingInput" pattern="[0-9]*" name="username" placeholder="임가번호를 입력해 주세요"
|
||||
type="text" inputmode="numeric">
|
||||
</div>
|
||||
<ul class="input-info" id="username-error" style="display: none;">
|
||||
<li>임가번호를 입력해주세요</li>
|
||||
@@ -35,7 +35,7 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="input-field">
|
||||
<input type="password" name="password" id="floatingPassword" placeholder="비밀번호 4자리를 입력해 주세요" value="1111" maxlength="4">
|
||||
<input type="password" name="password" id="floatingPassword" placeholder="비밀번호 4자리를 입력해 주세요" maxlength="4">
|
||||
</div>
|
||||
<ul class="input-info" id="password-error" style="display: none;">
|
||||
<li>비밀번호를 입력해주세요</li>
|
||||
@@ -95,7 +95,8 @@
|
||||
const userNameValue = floatingInput.value;
|
||||
const errorContainer = document.getElementById('username-error');
|
||||
const parentComponent = floatingInput.closest('.component-input');
|
||||
if (userNameValue.length < 5) {
|
||||
const isNumeric = /^[0-9]+$/.test(userNameValue);
|
||||
if (userNameValue.length < 5 || !isNumeric) {
|
||||
parentComponent.classList.add('input-invalid');
|
||||
errorContainer.style.display = 'block';
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user