0

' v-validate' in vue.js not working with <multiselect> when i submit form v-on:submit.prevent='fun()'

<div class="select-inp">
    <multiselect v-model="selectedShifts"
                 track-by="shift_name"
                 label="shift_name"
                 placeholder="Working shift" 
                 :options="shifts" 
                 :searchable="true"
                 v-validate="'required'">
     </multiselect>
</div>
Jesper
  • 3,816
  • 2
  • 16
  • 24
Mostafa Ahmed
  • 474
  • 7
  • 16
  • So you're using VeeValidate v2 for validating your multiselect? And is it this multiselect package you're using? https://vue-multiselect.js.org/ – Jesper Dec 19 '19 at 09:26
  • I shared your answer here. https://stackoverflow.com/questions/68221284/problems-using-vee-validates-field-and-vue-multiselect/72036609#72036609 – Fahri Meral Apr 28 '22 at 01:48

1 Answers1

0

I have tried to make validation custom using by if(){}else{} because , v-on:submit.prevent='fun() not working correctly and make my button type submit in form , using required only , and now it work correctly

Mostafa Ahmed
  • 474
  • 7
  • 16