PHPackages                             vesperabr/validation - 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. vesperabr/validation

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

vesperabr/validation
====================

A awesome set of PHP validation classes.

1.0.0(4y ago)058MITPHPPHP ^7.3|^8.0

Since Sep 13Pushed 4y ago1 watchersCompare

[ Source](https://github.com/vesperabr/validation)[ Packagist](https://packagist.org/packages/vesperabr/validation)[ Docs](https://github.com/vesperabr/validation)[ RSS](/packages/vesperabr-validation/feed)WikiDiscussions master Synced 1mo ago

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

The `vesperabr/validation` package provides an easy whay to validate input data.

It could be used in pure PHP or in Laravel projects.

Installation
------------

[](#installation)

You can install the package via composer:

```
$ composer require vesperabr/validation
```

The package will automatically register itself in Laravel.

How to use in Laravel
---------------------

[](#how-to-use-in-laravel)

All you need to do is append the rule to your rules list.

```
public function store(Request $request)
{
    $validated = $request->validate([
        'cpf' => 'required|cpf',
    ]);
}
```

### Available rules

[](#available-rules)

- cnpj
- cpf
- cpf\_ou\_cnpj
- uf

How to use in PHP
-----------------

[](#how-to-use-in-php)

```
use Vespera\Validation\Cpf;
$validation = Cpf::make('111.111.111-11')->validate();
```

### Avaiable classes

[](#avaiable-classes)

- `Vespera\Validation\Cnpj`
- `Vespera\Validation\Cpf`
- `Vespera\Validation\CpfOuCnpj`
- `Vespera\Validation\Uf`

Testing
-------

[](#testing)

```
$ composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [Ricardo Monteiro](https://github.com/ricazao)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

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

Unknown

Total

1

Last Release

1707d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7110502?v=4)[Ricardo Monteiro](/maintainers/ricazao)[@ricazao](https://github.com/ricazao)

---

Top Contributors

[![ricazao](https://avatars.githubusercontent.com/u/7110502?v=4)](https://github.com/ricazao "ricazao (3 commits)")

---

Tags

phplaravelvalidatorvalidationcpfcnpjvespera

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/vesperabr-validation/health.svg)

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

###  Alternatives

[proengsoft/laravel-jsvalidation

Validate forms transparently with Javascript reusing your Laravel Validation Rules, Messages, and FormRequest

1.1k2.3M49](/packages/proengsoft-laravel-jsvalidation)[laravel-validation-rules/credit-card

Validate credit card number, expiration date, cvc

2412.2M5](/packages/laravel-validation-rules-credit-card)[illuminatech/validation-composite

Allows uniting several validation rules into a single one for easy re-usage

184485.5k](/packages/illuminatech-validation-composite)[sadegh19b/laravel-persian-validation

A comprehensive Laravel validation package for Persian text, numbers, dates, and Iranian national identifiers

18293.8k1](/packages/sadegh19b-laravel-persian-validation)[stuyam/laravel-phone-validator

A phone validator for Laravel using the free Twilio phone lookup service.

2861.3k](/packages/stuyam-laravel-phone-validator)[mvdnbrk/gtin

GTIN / EAN / UPC Validation for Laravel

3148.6k1](/packages/mvdnbrk-gtin)

PHPackages © 2026

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