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

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

kennedytedesco/validation
=========================

The power of 'Respect Validation' on Laravel.

v9.0.0(3y ago)195113.9k↓21.2%241MITPHP

Since Aug 15Pushed 3y ago8 watchersCompare

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

READMEChangelog (10)Dependencies (6)Versions (27)Used By (1)

kennedytedesco/validation
=========================

[](#kennedytedescovalidation)

The power of [Respect Validation](https://github.com/Respect/Validation) on Laravel.

[![Build Status](https://camo.githubusercontent.com/d5722a4b58d86c7f1f694bdcd5a86185373a89f025d859696393c261cce49d88/68747470733a2f2f7472617669732d63692e6f72672f4b656e6e6564795465646573636f2f56616c69646174696f6e2e737667)](https://travis-ci.org/KennedyTedesco/Validation)[![Total Downloads](https://camo.githubusercontent.com/cac19abfcb5350ed250b415b38790021e51d48299f9b2fa50865631322c02efb/68747470733a2f2f706f7365722e707567782e6f72672f4b656e6e6564795465646573636f2f56616c69646174696f6e2f646f776e6c6f6164732e737667)](https://packagist.org/packages/KennedyTedesco/Validation)[![Latest Stable Version](https://camo.githubusercontent.com/ac163d853e8e5d2910a74e6f5a7b9610b66627a6164c021415cad4300d47304a/68747470733a2f2f706f7365722e707567782e6f72672f4b656e6e6564795465646573636f2f56616c69646174696f6e2f762f737461626c652e737667)](https://packagist.org/packages/KennedyTedesco/Validation)[![License](https://camo.githubusercontent.com/e997c3982e6b2c315b9caefbe76364612c2b7631a8dc37c426a014a41ddd2fe5/68747470733a2f2f706f7365722e707567782e6f72672f6f72636865737472612f7465737462656e63682f6c6963656e7365)](https://packagist.org/packages/orchestra/testbench)

Version Compatibility
---------------------

[](#version-compatibility)

Laravelkennedytedesco/validation**9.x**`composer require kennedytedesco/validation:^9.0`8.x`composer require kennedytedesco/validation:^8.0`7.x`composer require kennedytedesco/validation:^7.0`6.x`composer require kennedytedesco/validation:^6.0`5.8.x`composer require kennedytedesco/validation:^5.0`5.7.x`composer require kennedytedesco/validation:^5.0`5.6.x`composer require kennedytedesco/validation:^5.0`5.5.x`composer require kennedytedesco/validation:^5.0`Installation
------------

[](#installation)

```
composer require kennedytedesco/validation:^9.0
```

Supported rules (with examples)
-------------------------------

[](#supported-rules-with-examples)

```
$rules = [
    'cpf'               => ['cpf',],
    'cnpj'              => ['cnpj',],
    'cnh'               => ['cnh',],
    'minimumAge'        => ['minimumAge:20',],
    'callback'          => ['callback:is_int',],
    'charset'           => ['charset:ASCII',],
    'consonant'         => ['consonant',],
    'vowel'             => ['vowel',],
    'alnum'             => ['alnum:-',],
    'digit'             => ['digit',],
    'alpha'             => ['alpha',],
    'containsArray'     => ['contains:banana',],
    'contains'          => ['contains:banana',],
    'countryCode'       => ['countryCode',],
    'creditCard'        => ['digit', 'creditCard',],
    'domain'            => ['domain',],
    'directory'         => ['directory',],
    'fileExists'        => ['fileExists',],
    'isFile'            => ['file',],
    'endsWith'          => ['endsWith:banana',],
    'equals'            => ['equals:banana',],
    'even'              => ['even',],
    'floatVal'          => ['floatVal',],
    'float'             => ['floatVal',],
    'graph'             => ['graph',],
    'instance'          => ['instance:DateTime',],
    'int'               => ['int',],
    'json'              => ['json',],
    'leapDate'          => ['leapDate:Y-m-d',],
    'leapYear'          => ['leapYear',],
    'arrayVal'          => ['arrayVal',],
    'Arr'               => ['arrayVal',],
    'lowercase'         => ['lowercase',],
    'macAddress'        => ['macAddress',],
    'multiple'          => ['multiple:3',],
    'negative'          => ['negative',],
    'noWhitespace'      => ['noWhitespace',],
    'nullValue'         => ['nullValue',],
    'numeric'           => ['numeric',],
    'objectType'        => ['objectType',],
    'odd'               => ['odd',],
    'perfectSquare'     => ['perfectSquare',],
    'positive'          => ['positive',],
    'primeNumber'       => ['primeNumber',],
    'punct'             => ['punct',],
    'readable'          => ['readable',],
    'regex'             => ['regex:/5/',],
    'roman'             => ['roman',],
    'slug'              => ['slug',],
    'space'             => ['space:b',],
    'tld'               => ['tld',],
    'uppercase'         => ['uppercase',],
    'version'           => ['version',],
    'xdigit'            => ['xdigit',],
    'writable'          => ['writable',],
    'alwaysValid'       => ['alwaysValid',],
    'boolType'          => ['boolType',],
    'youtube'           => ['videoUrl:youtube',],
    'vimeo'             => ['videoUrl:vimeo',],
    'video1'            => ['videoUrl',],
    'video2'            => ['videoUrl',],
];

$data = [
    'cpf'               => '22205417118',
    'cnpj'              => '68518321000116',
    'cnh'               => '02650306461',
    'callback'          => 20,
    'charset'           => 'acucar',
    'consonant'         => 'dcfg',
    'vowel'             => 'aeiou',
    'alnum'             => 'banana-123 ',
    'digit'             => '120129  21212',
    'alpha'             => 'banana',
    'containsArray'     => ['www', 'banana', 'jfk', 'http',],
    'contains'          => 'www banana jfk http',
    'countryCode'       => 'BR',
    'creditCard'        => '5555666677778884',
    'domain'            => 'google.com.br',
    'directory'         => __DIR__,
    'fileExists'        => __FILE__,
    'file'              => __FILE__,
    'endsWith'          => 'pera banana',
    'equals'            => 'banana',
    'even'              => 8,
    'floatVal'          => 9.8,
    'graph'             => 'LKM@#$%4;',
    'instance'          => new \Datetime(),
    'int'               => 9,
    'json'              => '{"file":"laravel.php"}',
    'leapDate'          => '1988-02-29',
    'leapYear'          => '1988',
    'arrayVal'          => ['Brazil',],
    'lowercase'         => 'brazil',
    'macAddress'        => '00:11:22:33:44:55',
    'multiple'          => '9',
    'negative'          => '-10',
    'noWhitespace'      => 'laravelBrazil',
    'nullValue'         => null,
    'numeric'           => '179.9',
    'objectType'        => new \stdClass(),
    'odd'               => 3,
    'perfectSquare'     => 25,
    'positive'          => 1,
    'primeNumber'       => 7,
    'punct'             => '&,.;[]',
    'readable'          => __FILE__,
    'regex'             => '5',
    'roman'             => 'VI',
    'slug'              => 'laravel-brazil',
    'space'             => '              b      ',
    'tld'               => 'com',
    'uppercase'         => 'BRAZIL',
    'version'           => '1.0.0',
    'xdigit'            => 'abc123',
    'writable'          => __FILE__,
    'alwaysValid'       => '@#$_',
    'boolType'          => \is_int(2),
    'youtube'           => 'http://youtu.be/l2gLWaGatFA',
    'vimeo'             => 'http://vimeo.com/33677985',
    'video1'            => 'https://youtu.be/l2gLWaGatFA',
    'video2'            => 'https://vimeo.com/33677985',
];

$validator = \Validator::make($data, $rules);

if ($validator->passes()) {
    // Do something
}
```

For more validation rules
=========================

[](#for-more-validation-rules)

See all available rules here:

Repository of Respect Validation:

###  Health Score

45

—

FairBetter than 93% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity49

Moderate usage in the ecosystem

Community23

Small or concentrated contributor base

Maturity73

Established project with proven stability

 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

Every ~139 days

Recently: every ~296 days

Total

24

Last Release

1452d ago

Major Versions

4.0.0 → 5.0.02017-09-19

5.3 → v6.0.02019-09-03

v6.0.0 → v7.0.02020-03-14

v7.0.0 → v8.0.02020-09-18

v8.0.0 → v9.0.02022-05-27

PHP version history (7 changes)v1.0-beta.1PHP &gt;=5.3.0

2.0.0PHP &gt;=5.3.3

2.0.1PHP &gt;=5.4

3.0.0PHP &gt;=5.5.9

4.0.x-devPHP &gt;=5.6.4

5.0.0PHP &gt;=7.0.0

v6.0.0PHP &gt;=7.2

### Community

Maintainers

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

---

Top Contributors

[![KennedyTedesco](https://avatars.githubusercontent.com/u/999232?v=4)](https://github.com/KennedyTedesco "KennedyTedesco (94 commits)")[![ricardogobbosouza](https://avatars.githubusercontent.com/u/13064722?v=4)](https://github.com/ricardogobbosouza "ricardogobbosouza (10 commits)")[![henriquemoody](https://avatars.githubusercontent.com/u/154023?v=4)](https://github.com/henriquemoody "henriquemoody (1 commits)")[![icetee](https://avatars.githubusercontent.com/u/1855340?v=4)](https://github.com/icetee "icetee (1 commits)")[![phabloraylan](https://avatars.githubusercontent.com/u/21280189?v=4)](https://github.com/phabloraylan "phabloraylan (1 commits)")

---

Tags

laravelphpvalidationvalidatorvalidatorslaravelvalidationrespectrules

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/kennedytedesco-validation/health.svg)](https://phpackages.com/packages/kennedytedesco-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)[axlon/laravel-postal-code-validation

Worldwide postal code validation for Laravel and Lumen

3853.3M1](/packages/axlon-laravel-postal-code-validation)[laravel-validation-rules/credit-card

Validate credit card number, expiration date, cvc

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

Inspired 'KennedyTedesco Validation' - The power of 'Respect Validation' on Laravel.

2832.4k4](/packages/resultsystems-validation)[illuminatech/validation-composite

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

184485.5k](/packages/illuminatech-validation-composite)[galahad/laravel-addressing

Laravel package providing addressing functionality

70316.6k](/packages/galahad-laravel-addressing)

PHPackages © 2026

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