Answer the question
In order to leave comments, you need to log in
How to include vuelidate in vue3?
Hello!
Tell me how to connect this plugin, there is no Vue variable in the main.js file?
import { createApp } from 'vue'
import App from './App.vue'
createApp(App).mount('#app')
import Vuelidate from 'vuelidate'
Vue.use(Vuelidate)
Answer the question
In order to leave comments, you need to log in
Vuelidate v2 doesn't need to be globally included in main.js as it was in the previous vue 2 version . Now we need to use the useVuelidate() hook in the component's setup. Read more here https://vuelidate-next.netlify.app/
I would try to write it like this:
import { createApp } from 'vue'
import App from './App.vue'
import Vuelidate from 'vuelidate'
const app = createApp(App)
app.use(Vuelidate)
app.mount('#app')
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question