JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 7091
  • Score
    100M100P100Q123721F
  • License MIT

A library of validations applicable to several Brazilian data like I.E., CNPJ, CPF and others

Package Exports

  • br-validations

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (br-validations) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

br-validations

npm version Bower version Build Status Coverage Status

NPM

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

PIS/PASEP

    var BrV = require('./br-validations');
    var pis = '120.5825.883-7';
    var isValid = BrV.pis.validate(pis);

Contributing

We'd love for you to contribute to our source code! We just ask for you to:

  • Follow the commit conventions of conventional-changelog described in conventional-conventions
  • Write tests for the new feature or bug fix that you are solving
  • Ensure all tests pass before send the pull-request (Use: $ gulp test-coverage)