[Vuejs]-How can you set a global validation rule with FormKit

1👍

Yes, you can change this by overriding the global config. Wherever you are registering FormKit:

import { createApp } from 'vue'
import { plugin, defaultConfig } from '@formkit/vue'
import App from 'App.vue'

createApp(App).use(plugin, defaultConfig({
  messages: {
    en: {
      validation: {
        required: 'This field is required'
      }
    }
}).mount('#app')

This was pulled from the docs here: https://formkit.com/essentials/validation#global-validation-message

Leave a comment