PHPackages                             rockbuzz/lara-custom-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. rockbuzz/lara-custom-validation

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

rockbuzz/lara-custom-validation
===============================

Laravel custom validations

2.2.0(1y ago)05.3k[2 PRs](https://github.com/rockbuzz/lara-custom-validation/pulls)MITPHPPHP &gt;=7.2

Since Apr 16Pushed 1y agoCompare

[ Source](https://github.com/rockbuzz/lara-custom-validation)[ Packagist](https://packagist.org/packages/rockbuzz/lara-custom-validation)[ RSS](/packages/rockbuzz-lara-custom-validation/feed)WikiDiscussions master Synced 2mo ago

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

Lara Custom Validation
======================

[](#lara-custom-validation)

Laravel custom validations

[![](https://github.com/rockbuzz/lara-custom-validation/workflows/Main/badge.svg)](https://github.com/rockbuzz/lara-custom-validation/workflows/Main/badge.svg)

Requirements
------------

[](#requirements)

- PHP &gt;= 7.2.5
- Laravel 6+

Install
-------

[](#install)

```
$ composer require rockbuzz/lara-custom-validation
```

Available rules
---------------

[](#available-rules)

- [`CNPJ`](#CNPJ)
- [`CPF`](#CPF)
- [`FullName`](#FullName)
- [`HaveLetters`](#HaveLetters)
- [`HaveNumbers`](#HaveNumbers)
- [`HaveSpecialCharacters`](#HaveSpecialCharacters)
- [`MatchOldPassword`](#MatchOldPassword)
- [`Slug`](#Slug)

### `CNPJ`

[](#cnpj)

```
use Rockbuzz\LaraCustomValidation\Rules\CNPJ;

public function rules()
{
    return [
        'field' => [new CNPJ],
    ];
}
```

### `CPF`

[](#cpf)

```
use Rockbuzz\LaraCustomValidation\Rules\CPF;

public function rules()
{
    return [
        'field' => [new CPF],
    ];
}
```

### `FullName`

[](#fullname)

```
use Rockbuzz\LaraCustomValidation\Rules\FullName;

public function rules()
{
    return [
        'field' => [new FullName],
    ];
}
```

### `HaveLetters`

[](#haveletters)

```
use Rockbuzz\LaraCustomValidation\Rules\HaveLetters;

public function rules()
{
    return [
        'field' => [new HaveLetters],
    ];
}
```

### `HaveNumbers`

[](#havenumbers)

```
use Rockbuzz\LaraCustomValidation\Rules\HaveNumbers;

public function rules()
{
    return [
        'field' => [new HaveNumbers],
    ];
}
```

### `HaveSpecialCharacters`

[](#havespecialcharacters)

```
use Rockbuzz\LaraCustomValidation\Rules\HaveSpecialCharacters;

public function rules()
{
    return [
        'field' => [new HaveSpecialCharacters],
    ];
}
```

### `MatchOldPassword`

[](#matcholdpassword)

You can optionally pass two parameters in the constructor, the first is $ nullable which by default is false and the $user who by default is auth.

```
use Rockbuzz\LaraCustomValidation\Rules\MatchOldPassword;

public function rules()
{
    return [
        'field' => [new MatchOldPassword],
    ];
}
```

### `Slug`

[](#slug)

```
use Rockbuzz\LaraCustomValidation\Rules\Slug;

public function rules()
{
    return [
        'field' => [new Slug],
    ];
}
```

### You can use the extension mode

[](#you-can-use-the-extension-mode)

```
public function rules()
{
    return [
        'new_password' => 'match_old_password',
    ];
}
```

### Style Code

[](#style-code)

```
composer cs
```

### Testing

[](#testing)

```
composer test
```

License
-------

[](#license)

The Lara Custom Validation is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance39

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 94.4% 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 ~147 days

Recently: every ~380 days

Total

15

Last Release

516d ago

Major Versions

1.0.x-dev → 2.0.02020-10-10

PHP version history (2 changes)1.0.0PHP &gt;=7.1

2.0.0PHP &gt;=7.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/9a5c02aa268a45e5f1d9c67c331503d326eb4b49eb0fb80293dc7379ccef51f7?d=identicon)[rockbuzz](/maintainers/rockbuzz)

---

Top Contributors

[![tiagodevweb](https://avatars.githubusercontent.com/u/15040375?v=4)](https://github.com/tiagodevweb "tiagodevweb (34 commits)")[![renanrockbuzz](https://avatars.githubusercontent.com/u/115299341?v=4)](https://github.com/renanrockbuzz "renanrockbuzz (1 commits)")[![rockbuzz-dev](https://avatars.githubusercontent.com/u/48301419?v=4)](https://github.com/rockbuzz-dev "rockbuzz-dev (1 commits)")

---

Tags

laravelvalidationcustom validation

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/rockbuzz-lara-custom-validation/health.svg)

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

###  Alternatives

[schuppo/password-strength

This package provides a validator for ensuring strong passwords in Laravel 4 applications.

1432.7M1](/packages/schuppo-password-strength)[timacdonald/rule-builder

A fluent rule builder for Laravel validation rule generation.

1027.7k](/packages/timacdonald-rule-builder)[stuyam/laravel-phone-validator

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

2861.3k](/packages/stuyam-laravel-phone-validator)[skysplit/laravel5-intl-translation

Laravel 5 package for better translation syntax using php-intl extension

10106.2k](/packages/skysplit-laravel5-intl-translation)[pacerit/laravel-polish-validation-rules

Simple Polish Validation rules for Laravel and Lumen framework

1449.9k](/packages/pacerit-laravel-polish-validation-rules)[laravel-validation-rules/ip

Validate if an ip address is public or private.

1729.7k](/packages/laravel-validation-rules-ip)

PHPackages © 2026

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