PHPackages                             helsinque/cpf-cnpj - 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. helsinque/cpf-cnpj

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

helsinque/cpf-cnpj
==================

Validador para CPF e CNPJ agnóstico de framework

1.0.1(10y ago)2751[7 issues](https://github.com/helsinque/cpf_cnpj/issues)MITPHPPHP &gt;=5.6.4

Since Apr 10Pushed 9y ago2 watchersCompare

[ Source](https://github.com/helsinque/cpf_cnpj)[ Packagist](https://packagist.org/packages/helsinque/cpf-cnpj)[ RSS](/packages/helsinque-cpf-cnpj/feed)WikiDiscussions master Synced today

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

cpf\_cnpj
=========

[](#cpf_cnpj)

===========================================

Validador PHP para CPF e CNPJ agnóstico de framework. É uma lib criada para uma validação simples de CPF e CNPJ.

- Valida CPF com ou sem máscara.
- Valida CNPJ com ou sem máscara.
- - Valida documento na Receita Federal através da API "bipbop.com.br"

TL;DR
-----

[](#tldr)

Um simples exemplo de validação de CNPJ e uma com a Bipbop apresetando o retorno da Receita:

Validações
----------

[](#validações)

```
require __DIR__ . '/vendor/autoload.php';

$validate = new Helsinque\Validator();

try {
    $result = $validate->validate("Cnpj", "42.183.878/0001-50");
} catch (\Exception $e) {
    echo $e->getMessage();
}

echo $result; //true
```

For BipBop info
---------------

[](#for-bipbop-info)

```
require __DIR__ . '/vendor/autoload.php';

$config = [
    'API_BIPBOP_KEY' => YOUR_KEY_HERE
];

$validate = new Helsinque\Validator($config);

try {
    $result = $validate->validate("BipBop", "42.183.878/0001-50");
} catch (\Exception $e) {
    echo $e->getMessage();
}

echo $result; //informações sobre o cnpj
```

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 87.9% 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

Unknown

Total

1

Last Release

3733d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7644786?v=4)[Helsinque](/maintainers/helsinque)[@helsinque](https://github.com/helsinque)

---

Top Contributors

[![helsinque](https://avatars.githubusercontent.com/u/7644786?v=4)](https://github.com/helsinque "helsinque (29 commits)")[![eduardogalbiati](https://avatars.githubusercontent.com/u/7586945?v=4)](https://github.com/eduardogalbiati "eduardogalbiati (3 commits)")[![lfamorim](https://avatars.githubusercontent.com/u/195014?v=4)](https://github.com/lfamorim "lfamorim (1 commits)")

### Embed Badge

![Health badge](/badges/helsinque-cpf-cnpj/health.svg)

```
[![Health](https://phpackages.com/badges/helsinque-cpf-cnpj/health.svg)](https://phpackages.com/packages/helsinque-cpf-cnpj)
```

###  Alternatives

[chaoswey/taiwan-id-validator

台灣身分證、統一編號驗證

319.9k](/packages/chaoswey-taiwan-id-validator)

PHPackages © 2026

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