27 lines
699 B
TypeScript
27 lines
699 B
TypeScript
// import { createApp } from "vue";
|
|
// import Vuelidate from "@vuelidate/core";
|
|
|
|
// createApp.use(Vuelidate);
|
|
|
|
import { useVuelidate } from '@vuelidate/core'
|
|
import { required, minLength } from '@vuelidate/validators'
|
|
|
|
export default defineNuxtPlugin((nuxtApp) => {
|
|
nuxtApp.vueApp.use(() => {
|
|
// // Example of global setup, but typically you'd handle this in the component
|
|
// const state = reactive({
|
|
// firstName: ''
|
|
// })
|
|
// const rules = {
|
|
// firstName: {
|
|
// required,
|
|
// minLength: minLength(2)
|
|
// }
|
|
// }
|
|
// const v$ = useVuelidate(rules, state)
|
|
// return v$;
|
|
// // Return the v$ instance or any other necessary setup
|
|
})
|
|
})
|
|
|