BootstrapVue VeeValidate - show an extra error message when form is invalid

后端 未结 1 1017
梦如初夏
梦如初夏 2020-12-12 06:14

I am using BootstrapVue and VeeValidate in my Laravel + Vue.js SPA (Single Page Appplication). When form fields are invalid, it automatically shows errors in respective posi

相关标签:
1条回答
  • 2020-12-12 07:06

    Grab the failed state from the ValidationObserver slot props:

    <ValidationObserver ref="form" v-slot="{ failed, passes }">
      <div v-if="failed">Invalid Data</div>
    
    <!-- rest of your fields -->
    </ValidationObserver>
    
    0 讨论(0)
提交回复
热议问题