이름 10자까지로 수정
This commit is contained in:
@@ -48,8 +48,8 @@ public class AdminCreateValidator implements Validator {
|
|||||||
if (vo.getName() == null || vo.getName().isBlank()) {
|
if (vo.getName() == null || vo.getName().isBlank()) {
|
||||||
errors.rejectValue("name", "error.name", "이름을 입력해주세요.");
|
errors.rejectValue("name", "error.name", "이름을 입력해주세요.");
|
||||||
}
|
}
|
||||||
if (vo.getName().length() > 5) {
|
if (vo.getName().length() > 10) {
|
||||||
errors.rejectValue("name", "error.name", "이름은 5자리까지 입력가능합니다.");
|
errors.rejectValue("name", "error.name", "이름은 10자까지 입력가능합니다.");
|
||||||
}
|
}
|
||||||
if (vo.getPhone1() == null || vo.getPhone1().isBlank()) {
|
if (vo.getPhone1() == null || vo.getPhone1().isBlank()) {
|
||||||
errors.rejectValue("phone1", "error.phone1", "전화번호 앞자리를 입력해주세요.");
|
errors.rejectValue("phone1", "error.phone1", "전화번호 앞자리를 입력해주세요.");
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ public class AdminUpdateValidator implements Validator {
|
|||||||
if (vo.getName() == null || vo.getName().isBlank()) {
|
if (vo.getName() == null || vo.getName().isBlank()) {
|
||||||
errors.rejectValue("name", "error.name", "이름을 입력해주세요.");
|
errors.rejectValue("name", "error.name", "이름을 입력해주세요.");
|
||||||
}
|
}
|
||||||
if (vo.getName().length() > 5) {
|
if (vo.getName().length() > 10) {
|
||||||
errors.rejectValue("name", "error.name", "이름은 5자리까지 입력가능합니다.");
|
errors.rejectValue("name", "error.name", "이름은 10자까지 입력가능합니다.");
|
||||||
}
|
}
|
||||||
if (vo.getPhone1() == null || vo.getPhone1().isBlank()) {
|
if (vo.getPhone1() == null || vo.getPhone1().isBlank()) {
|
||||||
errors.rejectValue("phone1", "error.phone1", "전화번호 앞자리를 입력해주세요.");
|
errors.rejectValue("phone1", "error.phone1", "전화번호 앞자리를 입력해주세요.");
|
||||||
|
|||||||
@@ -79,7 +79,7 @@
|
|||||||
<div class="input-field">
|
<div class="input-field">
|
||||||
<input id="name" type="text" name="name"
|
<input id="name" type="text" name="name"
|
||||||
th:classappend="${#fields.hasErrors('name')} ? 'is-invalid'"
|
th:classappend="${#fields.hasErrors('name')} ? 'is-invalid'"
|
||||||
th:field="*{name}"/>
|
th:field="*{name}" maxlength="10"/>
|
||||||
<div class="invalid-feedback fw-bold"
|
<div class="invalid-feedback fw-bold"
|
||||||
th:if="${#fields.hasErrors('name')}">
|
th:if="${#fields.hasErrors('name')}">
|
||||||
에러 메세지
|
에러 메세지
|
||||||
@@ -97,12 +97,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="component-input">
|
<div class="component-input">
|
||||||
<div class="input-field">
|
<div class="input-field">
|
||||||
<input type="number" id="phone1" name="phone1" placeholder="" th:field="*{phone1}">
|
<input type="number" id="phone1" name="phone1" placeholder="" th:field="*{phone1}" maxlength="4">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="component-input">
|
<div class="component-input">
|
||||||
<div class="input-field">
|
<div class="input-field">
|
||||||
<input type="number" id="phone2" name="phone2" placeholder="" th:field="*{phone2}">
|
<input type="number" id="phone2" name="phone2" placeholder="" th:field="*{phone2}" maxlength="4">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -71,7 +71,7 @@
|
|||||||
<div class="input-field">
|
<div class="input-field">
|
||||||
<input id="name" type="text" name="name"
|
<input id="name" type="text" name="name"
|
||||||
th:classappend="${#fields.hasErrors('name')} ? 'is-invalid'"
|
th:classappend="${#fields.hasErrors('name')} ? 'is-invalid'"
|
||||||
th:field="*{name}"/>
|
th:field="*{name}" maxlength="10" />
|
||||||
<div class="invalid-feedback fw-bold"
|
<div class="invalid-feedback fw-bold"
|
||||||
th:if="${#fields.hasErrors('name')}">
|
th:if="${#fields.hasErrors('name')}">
|
||||||
에러 메세지
|
에러 메세지
|
||||||
@@ -89,7 +89,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="component-input">
|
<div class="component-input">
|
||||||
<div class="input-field">
|
<div class="input-field">
|
||||||
<input type="number" id="phone1" name="phone1" placeholder=""
|
<input type="number" id="phone1" name="phone1" placeholder="" maxlength="4"
|
||||||
th:value="${bindingVO.phone1 != null ? bindingVO.phone1 : ''}">
|
th:value="${bindingVO.phone1 != null ? bindingVO.phone1 : ''}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -99,7 +99,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="component-input">
|
<div class="component-input">
|
||||||
<div class="input-field">
|
<div class="input-field">
|
||||||
<input type="number" id="phone2" name="phone2" placeholder=""
|
<input type="number" id="phone2" name="phone2" placeholder="" maxlength="4"
|
||||||
th:value="${bindingVO.phone2 != null ? bindingVO.phone2 : ''}">
|
th:value="${bindingVO.phone2 != null ? bindingVO.phone2 : ''}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user