Skip to content

Commit 95f13ce

Browse files
committed
🐛 [fix] 요청 수정 페이지 1, 2차 카테고리 동시 validation 수정
1 parent 0b171a7 commit 95f13ce

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/components/request-task/ReRequestTask.vue

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
:label-name="'1차 카테고리'"
77
:placeholderText="'1차 카테고리를 선택해주세요'"
88
:isDisabled="false"
9-
:is-invalidate="isInvalidate" />
9+
:is-invalidate="isInvalidate === 'category1' ? 'category' : ''" />
1010
<CategoryDropDown
1111
v-model="category2"
1212
:options="afterSubCategoryArr"
1313
:label-name="'2차 카테고리'"
1414
:placeholderText="'2차 카테고리를 선택해주세요'"
1515
:isDisabled="!category1"
16-
:is-invalidate="isInvalidate" />
16+
:is-invalidate="isInvalidate === 'category2' ? 'category' : ''" />
1717
<RequestTaskInput
1818
v-model="title"
1919
:placeholderText="'제목을 입력해주세요'"
@@ -114,8 +114,12 @@ watch(category1, async newValue => {
114114
115115
const handleSubmit = async () => {
116116
if (isSubmitting.value || isModalVisible.value) return
117-
if (!category2.value) {
118-
isInvalidate.value = 'category'
117+
118+
if (!category1.value) {
119+
isInvalidate.value = 'category1'
120+
return
121+
} else if (!category2.value) {
122+
isInvalidate.value = 'category2'
119123
return
120124
} else if (!title.value) {
121125
isInvalidate.value = 'input'

0 commit comments

Comments
 (0)