Instructions for Reproduction:
If the required rules for multiple select do not work, it is acceptable if it is not a multiple selection.
Desired Outcome
The rules should function correctly for multiple selections as well.
Current Outcome
The rules fail to work when it is a multiple select.
Code for Reproduction :
<div id="app">
<v-app id="inspire">
<v-select
:items="role"
label="Admin level*"
class="mt-3 "
@focus="reset"
item-text="name"
item-value="name"
v-model="roleee"
required
:rules="rules.select"
></v-select>
<v-select
:items="subsidiaries"
label="Subsidiary*"
class="mt-3 "
@focus="reset"
item-text="name"
item-value="name"
v-model="subsidiariesss"
multiple
required
:rules="rules.select"
:menu-props="{ bottom: true, offsetY: true }"
></v-select>
</v-app>
</div>
<script>
new Vue({
el: '#app',
data: {
role:[
{name:'Admin', id:1},
{name: 'SuperAdmin', id:2}
],
subsidiaries: [
{name: "ASdsad", id:1},
{name: "dsd", id:2},
{name: "34", id:3},
{name: "ASvxcdsad", id:4}
],
rules: {
select: [v => !!v || 'Item is required']
}
},
methods: {
reset() {
this.$refs.form.resetValidation();
},
}
})
</script>