br-validations
A library of validations applicable to several Brazilian data like I.E., CNPJ, CPF and others.
Instalation
With npm
npm install --save br-validations
With bower
bower install --save br-validations
Runing tests
gulp test
Validations
Inscrição Estadual
var BrV = require('./br-validations');
var uf = 'PE';
var ie = '1321418-40';
var isValid = BrV.ie(uf).validate(ie);
See: Conferência de Inscrições Estaduais
CPF
var BrV = require('./br-validations');
var cpf = '219.841.712-08';
var isValid = BrV.cpf.validate(cpf);
CNPJ
var BrV = require('./br-validations');
var cnpj = '10.157.471/0001-61';
var isValid = BrV.cnpj(uf).validate(cnpj);
RG
Not implemented yet