base_ui/plugins/vuelidate.ts

27 lines
699 B
TypeScript
Raw Normal View History

2025-02-01 09:34:55 +00:00
// 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
})
})