0.2.1 • Published 4 years ago

vue-validation-message v0.2.1

Weekly downloads
3
License
ISC
Repository
github
Last release
4 years ago

vue-validation-message

How to use

1) In the desired component, import the lib

import validation from 'vue-validation-message'

2) Add to the component's list

components: {
  validation
}

3) Show the validation message

<validation :property="$v.model.name" message="Must be filled in the correct format" v-multi-ref:validation />

Being:
property the vuelidate property
message the validation message
v-multi-ref:validation the reference (v-multi-ref), a trigger to activate de message

Advanced usage

If you have multiple validations to a single property, e.g:

validations: {  
  model: {  
    name: {  
      required,  
      validFormat: function() {  
        return x === y  
      }  
    }  
  }  
}  

You can pass the message parameter as an object with the properties and messages:

<validation :property="$v.model.name" :message="{required: 'Please fill out this field', validFormat: 'Must be filled in the correct format'}" v-multi-ref:validation />

Project setup

yarn install

Compiles and hot-reloads for development

yarn run serve

Compiles and minifies for production

yarn run build

Run your tests

yarn run test

Lints and fixes files

yarn run lint

Customize configuration

See Configuration Reference.

0.2.1

4 years ago

0.2.0

4 years ago

0.1.0

4 years ago