Skip to content

Commit

Permalink
chore: use @vee-validate/nuxt
Browse files Browse the repository at this point in the history
  • Loading branch information
codeflorist committed Oct 2, 2024
1 parent 0a8e980 commit 4d69c06
Show file tree
Hide file tree
Showing 13 changed files with 33 additions and 20 deletions.
2 changes: 0 additions & 2 deletions components/form/FormChipGroup.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<script setup lang="ts">
import { useField } from 'vee-validate'
type Item = {
title: string
value: string
Expand Down
2 changes: 0 additions & 2 deletions components/form/FormCombobox.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<script setup lang="ts">
import { useField } from 'vee-validate'
const props = defineProps({
name: {
type: String,
Expand Down
2 changes: 0 additions & 2 deletions components/form/FormRadio.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<script setup lang="ts">
import { useField } from 'vee-validate'
const props = defineProps({
name: {
type: String,
Expand Down
2 changes: 0 additions & 2 deletions components/form/FormRadioGroup.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<script setup lang="ts">
import { useField } from 'vee-validate'
type Item = {
title: string
value: string
Expand Down
2 changes: 0 additions & 2 deletions components/form/FormSelectField.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<script setup lang="ts">
import { useField } from 'vee-validate'
const props = defineProps({
name: {
type: String,
Expand Down
2 changes: 0 additions & 2 deletions components/form/FormSwitch.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<script setup lang="ts">
import { useField } from 'vee-validate'
const props = defineProps({
name: {
type: String,
Expand Down
3 changes: 0 additions & 3 deletions components/form/FormTextField.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
<script setup lang="ts">
import { useField } from 'vee-validate'
import { defineProps, toRef } from 'vue'
const props = defineProps({
name: {
type: String,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { defineRule, useForm } from 'vee-validate'
import { defineRule } from 'vee-validate'
const emit = defineEmits<{
(e: 'hasErrors', state: boolean): void
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<script setup lang="ts">
import { useForm } from 'vee-validate'
const props = defineProps({
category: {
type: [String as () => DataProcessingCategory],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<script setup lang="ts">
import { useForm } from 'vee-validate'
const props = defineProps({
modelValue: {
type: Object,
Expand Down
13 changes: 13 additions & 0 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export default defineNuxtConfig({
'@nuxtjs/sitemap',
'@vueuse/nuxt',
'@nuxt/eslint',
'@vee-validate/nuxt',
'vuetify-nuxt-module'
],
css: [
Expand Down Expand Up @@ -195,6 +196,18 @@ export default defineNuxtConfig({
},
},

// VeeValidate config (see https://vee-validate.logaretm.com/v4/integrations/nuxt)
veeValidate: {
autoImports: true,
// Use different names for components
componentNames: {
Form: 'VeeForm',
Field: 'VeeField',
FieldArray: 'VeeFieldArray',
ErrorMessage: 'VeeErrorMessage',
},
},

// Sitemap module config (see https://nuxtseo.com/sitemap)
site: {
url: 'https://privacy-policy-generator.web.florist',
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"@nuxtjs/tailwindcss": "^6.12.1",
"@types/node": "^22",
"@vee-validate/i18n": "^4.13.2",
"@vee-validate/nuxt": "^4.13.2",
"@vee-validate/rules": "^4.13.2",
"@vueuse/nuxt": "^11.1.0",
"autoprefixer": "^10.4.20",
Expand Down
18 changes: 18 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4d69c06

Please sign in to comment.