nuxt-validate icon indicating copy to clipboard operation
nuxt-validate copied to clipboard

Problems changing the languaage

Open sowinski opened this issue 4 years ago • 2 comments

Hi,

how can I change the language of nuxt-validate? I also use nuxt-i18n.

In the readme there is the following line:

notice: If you use nuxt-i18n module, declare the nuxt-validate module at before it. So my modules look like that at the moment.

  modules: [
    'bootstrap-vue/nuxt',
    '@nuxtjs/axios',
    '@nuxtjs/eslint-module',
    '@nuxtjs/sentry',
    'nuxt-validate',
    'nuxt-i18n'
  ],

So this is correct, right?

  1. How can I change the language statically to for example french.
  2. Why is nuxt-validate not picking the language from nuxt-i18n. What additional steps do I need?

Thank you!

sowinski avatar May 06 '20 10:05 sowinski

I think there is a bug "Using top level options".

If I write the options directly in the module like that everything works.

modules: [
    'bootstrap-vue/nuxt',
    '@nuxtjs/axios',
    '@nuxtjs/eslint-module',
    '@nuxtjs/sentry',
    ['nuxt-validate', {
      nuxti18n: true,
      classes: true,
      classNames: {
        valid: 'is-valid',
        invalid: 'is-invalid'
      },
      fieldsBagName: 'veeFields'
    }],
    'nuxt-i18n'
  ],

Can someone confirm this problem?

sowinski avatar May 14 '20 11:05 sowinski

@sowinski I confirm this problem too. I also solved it by passing the options directly.

miteyema avatar Jun 27 '20 05:06 miteyema