1.0.12 • Published 4 years ago

@slikmen/vue-validation v1.0.12

Weekly downloads
13
License
GNU
Repository
github
Last release
4 years ago

validation

Version License Size

What purpose is this npm package

When I was developing, I found a feature that was not implemented yet. The issue lies in Vee-validate Version 2.*.

I found that when I wanted to remove the error message on focus and revalidate field on blur this was not possible.

To make it possible I used the Vee-validation API to remove and validate. This is just an extension on Vee-validate and works with every rule.

How to use

For non-global you need to add a directive 'v-validate-custom'

// import Script
import vueValidation from '@slikmen/vue-validation'
Vue.use(vueValidation)
<template>
    <div>
        <input name="field" v-validate="'required'" v-validate-custom>
        <p v-if="errors.has('field')">{{ errors.first('field') }}</p>
    </div>
</template>

Global option

For global use you just need to add true in the Vue.use()

// import Script
import vueValidation from '@slikmen/vue-validation'
Vue.use(vueValidation, true)

<template>
    <div>
        <input name="field" v-validate="'required'">
        <p v-if="errors.has('field')">{{ errors.first('field') }}</p>
    </div>
</template>
1.0.12

4 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago