PHPackages                             wartent/cpfcnpj-laravel - 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. wartent/cpfcnpj-laravel

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

wartent/cpfcnpj-laravel
=======================

Validação de CPF, CNPJ, CPFCNPJ para laravel 5.\*

1.0.0(10y ago)026MITPHPPHP &gt;=5.5.9

Since Mar 10Pushed 9y agoCompare

[ Source](https://github.com/wartent/cpfcnpj-laravel)[ Packagist](https://packagist.org/packages/wartent/cpfcnpj-laravel)[ RSS](/packages/wartent-cpfcnpj-laravel/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (2)Used By (0)

cpfcnpj-laravel
===============

[](#cpfcnpj-laravel)

Validação de cpf, cnpj, cpfcnpj para laravel 5.\*

#### Instalação Composer

[](#instalação-composer)

```
$ composer require eltoninacio/cpfcnpj-laravel

```

ou

```
"require": {
    "eltoninacio/cpfcnpj-laravel": "1.0.*"
}

```

```
$ composer update

```

#### Configuração Laravel

[](#configuração-laravel)

Registre o ServiceProvider no array `providers` dentro do arquivo `config/app.php`:

```
'providers' => [
	// ...
    EltonInacio\ValidadorCpjCnpj\CpfCnpjServiceProvider::class
]
```

#### Exemplo de uso

[](#exemplo-de-uso)

```
$this->validade($request, [
    'cpf'       => 'cpf',
    'cnpj'      => 'cnpj',
    'cpfcnpj'   => 'cpfcnpj'
])
```

ou

```
namespace App\Http\Requests;

use App\Http\Requests\Request;

class CpfCnpjRequest extends Request {

	/**
	 * Determine if the user is authorized to make this request.
	 *
	 * @return bool
	 */
	public function authorize()
	{
		return true;
	}

	/**
	 * Get the validation rules that apply to the request.
	 *
	 * @return array
	 */
	public function rules()
	{
		return [
			'cpf' 		=> 'cpf',
			'cnpj'		=> 'cnpj',
			'cpfcnpj'	=> 'cpfcnpj'
		];
	}

}
```

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

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

3764d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/126625277?v=4)[wartent](/maintainers/wartent)[@Wartent](https://github.com/Wartent)

---

Top Contributors

[![eltoninacio](https://avatars.githubusercontent.com/u/9136186?v=4)](https://github.com/eltoninacio "eltoninacio (3 commits)")[![alvarofelipems](https://avatars.githubusercontent.com/u/4182816?v=4)](https://github.com/alvarofelipems "alvarofelipems (1 commits)")

### Embed Badge

![Health badge](/badges/wartent-cpfcnpj-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/wartent-cpfcnpj-laravel/health.svg)](https://phpackages.com/packages/wartent-cpfcnpj-laravel)
```

###  Alternatives

[chaoswey/taiwan-id-validator

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

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

PHPackages © 2026

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