Skip to content

Commit

Permalink
version 0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
VitorLuizC committed Aug 21, 2017
1 parent e1af172 commit 24ba41e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
25 changes: 23 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@

[![Build Status][0]][1]

Plugin com validações, formatações e filtros para projetos Vue.
Plugin com validações, formatações e filtros para projetos Vue. Validação e
formatação de CPF, CNPJ, datas, dinheiro (R$) etc.

## Instalação

Instale a dependência publicada no NPM.

```shell
npm i vue-convenia-util
yarn add vue-convenia-util
```

### Instalação global
Expand Down Expand Up @@ -46,5 +47,25 @@ new Vue({
}
```
### Integração com o [`vee-validate`](https://github.com/baianat/vee-validate)
O Util disponibiliza a função `integrate` que serve basicamente para o integrar
em outras libs. Com o vee-validade, e por enquanto só com ele mesmo, basta usar
essa função.
```js
import Util from 'vue-convenia-util'
import VeeValidate, { Validator } from 'vee-validate'

// Util.integrate(nome da lib, objeto de integração, opções opcionais)

Util.integrate('vee-validate', Validator, {
isEmail: { // Por padrão apenas o isEmail é a única função que não é
name: 'email', // injetada no Validator e essa é a forma de faze-lo.
getMessage: () => 'Email inválido.'
}
})
```
[0]: https://travis-ci.org/convenia/vue-convenia-util.svg?branch=master
[1]: https://travis-ci.org/convenia/vue-convenia-util
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-convenia-util",
"version": "0.3.0",
"version": "0.4.0",
"description": "Plugin com validações, formatações e filtros para projetos Vue.",
"keywords": [
"convenia",
Expand Down

0 comments on commit 24ba41e

Please sign in to comment.