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

ActiveLibrary

douglasmariz/laravel-cpfcnpj
============================

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

1.0.0(8y ago)157MITPHPPHP &gt;=5.5.9

Since May 11Pushed 8y ago1 watchersCompare

[ Source](https://github.com/DouglasMariz/laravel-cpfcnpj)[ Packagist](https://packagist.org/packages/douglasmariz/laravel-cpfcnpj)[ Docs](https://github.com/DouglasMariz/laravel-cpfcnpj)[ RSS](/packages/douglasmariz-laravel-cpfcnpj/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (3)Versions (2)Used By (0)

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

[](#laravel-cpfcnpj)

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

#### Instalação Composer

[](#instalação-composer)

```
$ composer require douglasmariz/laravel-cpfcnpj

```

ou

```
"require": {
    "douglasmariz/laravel-cpfcnpj": "dev-master"
}

```

```
$ composer update

```

#### Configuração Laravel

[](#configuração-laravel)

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

```
'providers' => [
	// ...
    DouglasMariz\ValidadorCpfCnpj\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

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

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

2924d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f2ab8553139636951f53626f58d59c7377d2a3b40a3d8d274ec552720170c0af?d=identicon)[DouglasMariz](/maintainers/DouglasMariz)

---

Tags

laravelvalidatecpfcnjpj

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[milwad/laravel-validate

The Laravel-Validate package enhanced Laravel validation capabilities with custom rules and methods for simplified and efficient validation logic.

59739.5k1](/packages/milwad-laravel-validate)[jansenfelipe/cpf-gratis

Com esse pacote você poderá consultar, gratuitamente, CPFs diretamente no site da receita.

1895.9k](/packages/jansenfelipe-cpf-gratis)[jailtonsc/validador-cpf-laravel

Validador de cpf com suporte para laravel 5.\*

2147.9k](/packages/jailtonsc-validador-cpf-laravel)[unicodeveloper/laravel-email-validator

Provides a Facade to help validate and verify email addresses

2332.5k](/packages/unicodeveloper-laravel-email-validator)[larapack/command-validation

Enable a method for Artisan Commands to validate the output of methods like `ask`.

133.8k](/packages/larapack-command-validation)

PHPackages © 2026

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