PHPackages                             tigo/documentbr - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. tigo/documentbr

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

tigo/documentbr
===============

Validação de cpf e cnpj

v0.0.3(5y ago)414.7k↓34.4%[1 issues](https://github.com/tigoCaval/document-br/issues)MitPHPPHP &gt;=7.0.0

Since Dec 20Pushed 4y ago1 watchersCompare

[ Source](https://github.com/tigoCaval/document-br)[ Packagist](https://packagist.org/packages/tigo/documentbr)[ Fund](https://www.paypal.com/donate?hosted_button_id=GNFS3L3FRC9K8)[ RSS](/packages/tigo-documentbr/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (2)DependenciesVersions (4)Used By (0)

Documentos BR - Validador e Gerador de CPF e CNPJ
=================================================

[](#documentos-br---validador-e-gerador-de-cpf-e-cnpj)

Validar e Gerar CPF/CNPJ

- Observação: este pacote pode ser utilizado com Laravel/composer ou em qualquer aplicação PHP.
- Baixar pacote: `composer require tigo/documentbr`
- Sintaxe exemplo:

Em algum lugar do seu projeto, pode ser necessário usar o autoload

```
include __DIR__ ."/vendor/autoload.php";
```

```
use Tigo\DocumentBr\Cpf; //import class
use Tigo\DocumentBr\Cnpj; //import class

$cpf = new Cpf();
var_dump($cpf->check('00000000000')); // verifica se o cpf é válido, caso seja válido retorne true
var_dump($cpf->generate());// gerar cpf válido

$cnpj = new Cnpj();
var_dump($cnpj->check('00000000000000')); // verifica se o cnpj é válido, caso seja válido retorne true
var_dump($cnpj->generate());// gerar cnpj válido
```

Projeto Exemplo
---------------

[](#projeto-exemplo)

Exemplo de um projeto utilizando este pacote: [tigoCaval/example-documentbr](https://github.com/tigoCaval/example-documentbr)

Licença
-------

[](#licença)

Licença MIT. Veja o arquivo [License](https://github.com/tigoCaval/document-br/blob/main/LICENSE).

---

Olá! Se você achou este pacote útil, considere fazer uma [doação](https://www.paypal.com/donate?hosted_button_id=GNFS3L3FRC9K8). Fique à vontade para contribuir ou não.

[![paypal](https://camo.githubusercontent.com/bbd11cbf153bfc86cad262d7f7f7c77bc265322f5345d07dea2218ef446bfb20/68747470733a2f2f7777772e70617970616c6f626a656374732e636f6d2f70745f42522f692f62746e2f62746e5f646f6e6174655f534d2e676966)](https://www.paypal.com/donate?hosted_button_id=GNFS3L3FRC9K8)

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance15

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~75 days

Total

3

Last Release

1871d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3f4b80fc9ba8d77c8b32d353d540dbd116ca6402f693e132aa7b1c21c15db39f?d=identicon)[tigopereira](/maintainers/tigopereira)

---

Top Contributors

[![tigoCaval](https://avatars.githubusercontent.com/u/19934116?v=4)](https://github.com/tigoCaval "tigoCaval (23 commits)")

---

Tags

cnpjcnpj-generatorcnpj-validatorcpfcpf-generatorcpf-validador

### Embed Badge

![Health badge](/badges/tigo-documentbr/health.svg)

```
[![Health](https://phpackages.com/badges/tigo-documentbr/health.svg)](https://phpackages.com/packages/tigo-documentbr)
```

###  Alternatives

[marcosh/php-validation-dsl

A DSL for validating data in a functional fashion

483.9k](/packages/marcosh-php-validation-dsl)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
