lewyuburi / nuxt-validate

Simple Nuxt input validation module using vee-validate
https://www.npmjs.com/package/nuxt-validate
MIT License
122 stars 19 forks source link

`Rules` property in nuxt.config.js is not respected #29

Open simplenotezy opened 4 years ago

simplenotezy commented 4 years ago

I have defined rules like so (two places, becasue I am unsure which -- not clear according to documentation):

    ['nuxt-validate', {
        lang: 'en',
        rules: ['email', 'min', 'max', 'confirmed', 'numeric'],
        nuxti18n: {
            locale: {
                'da': 'da',
                'en': 'en'
            },
            rules: ['email', 'min', 'max', 'confirmed', 'numeric']
        },
        mode: 'eager',
        classes: {
            valid: 'is-success',
            invalid: 'is-danger'
        }
        // regular vee-validate options
        // https://github.com/logaretm/vee-validate/blob/master/docs/configuration.md
    }],

However, ALL rules are still being imported. For instance, I can use "digits" rule in my code without issues.

kuddl commented 4 years ago

Any information on that??

aaharu commented 4 years ago

19

master branch's nuxt-validate is not released to npm. 😕

nuxt-validate@1.0.1's source code is here.

fabiofdsantos commented 4 years ago

ping @lewyuburi