vee-cpf-cnpj
CPF and CNPJ validators for VeeValidate 3
This package is a simple wrapper around the @fnando/cnpj and @fnando/cpf validators to expose an validation object ready to be imported into VeeValidate
Installation
This lib is available as a NPM package. To install it, use the following command:
npm install vee-cpf-cnpj --save
Or, if you're using yarn
yarn add vee-cpf-cnpj
Usage
// @import; // import what you need // add validators to VeeValidate;;;
Available validators
cpf
The field under validation must a valid CPF
cnpj
The field under validation must a valid CNPJ
cpfOrCnpj
The field under validation must either a valid CPF or a valid CNPJ