Skip to content

Commit

Permalink
Switch to inline validation for v-combobox
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewKostka committed Jan 16, 2024
1 parent 4c00bcb commit 3f24b32
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/components/Pages/ManageWiki/Cards/QuestyCaptcha.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
outlined
hide-details="auto"
:append-outer-icon="showIcon ? 'mdi-delete-outline' : undefined"
:rules="[() => !!entry.question || 'Field cannot be empty. Please provide a question']"
:rules="[() => !!entry.question || 'Field cannot be empty. Please provide a question.']"
@click:append-outer="removeQuestion(index)"
dense
></v-text-field>
Expand All @@ -41,7 +41,7 @@
:items="entry.answers"
multiple
outlined
:rules="[required]"
:rules="[() => !!entry.answers.length || 'Field cannot be empty. Please provide an answer.']"
hide-selected
hide-details="auto"
dense
Expand Down Expand Up @@ -192,12 +192,6 @@ export default {
const recoveredDefaultQuestions = this.$store.state.wikis.currentWikiSettings.defaultQuestions
this.questionsFromStore = JSON.parse(JSON.stringify(recoveredDefaultQuestions))
},
required (value) {
if (value.length === 0) {
return 'Field cannot be empty. Please provide an answer'
}
return !!value || 'Field cannot be empty. Please provide an answer'
},
closeAlert () {
this.successMessage = false
this.errorMessage = false
Expand Down

0 comments on commit 3f24b32

Please sign in to comment.