Skip to content

Commit

Permalink
add validation for step 2
Browse files Browse the repository at this point in the history
  • Loading branch information
edelagnier committed Dec 8, 2023
1 parent 424effe commit 3be93d9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/components/forms/topic/TopicForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
/>
<TopicThemeFieldGroup
v-if="currentStep == 2"
@updateValidation="(isValid) => updateStepValidation(2, isValid)"
v-model:theme="topic.theme"
v-model:subtheme="topic.subtheme"
/>
Expand Down Expand Up @@ -82,7 +83,7 @@ export default {
datasetsProperties: []
},
currentStep: 1,
stepsValidation: [false, NoValidationNeeded, NoValidationNeeded],
stepsValidation: [false, false, NoValidationNeeded],
errorMsg: null
}
},
Expand Down
4 changes: 3 additions & 1 deletion src/components/forms/topic/TopicThemeFieldGroup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ export default {
},
computed: {
isValid() {
return true
return (
this.theme !== NoOptionSelected && this.subtheme !== NoOptionSelected
)
},
errorMsg() {
return ''
Expand Down

0 comments on commit 3be93d9

Please sign in to comment.