Validocs library for document and pattern validation.
The current list of documents and patterns implemented on this project are:
- CPF
Cadastro Pessoas Físicas (brazilian federal document required for natural persons) - CNPJ
Cadastro Nacional de Pessoas Jurídicas (brazilian federal document required for legal persons) - PIS
Programa de Integração Social (brazilian federal document required for natural persons)
- Fabio Marciano [email protected]
This project is licensed under the terms of the MIT license.
$ npm install validocs --save
Typescript example:
Import and use a module:
import CPF from 'validocs/cpf';
const cpf: CPF.Cpf = CPF.make();
console.log(`Generated CPF number: ${cpf}`);
The projects wiki is available at github.