PHPackages                             it-brains/laravel-validator - 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. it-brains/laravel-validator

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

it-brains/laravel-validator
===========================

0.1.12(1y ago)020.6k↑428.6%MITPHPPHP &gt;=7.0CI failing

Since Feb 10Pushed 1y ago1 watchersCompare

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

READMEChangelog (1)Dependencies (2)Versions (14)Used By (0)

Useful Laravel Validation Rules
===============================

[](#useful-laravel-validation-rules)

Custom rules
------------

[](#custom-rules)

- uniqueModel
- existsModel

Examples
--------

[](#examples)

### uniqueModel instead just unique

[](#uniquemodel-instead-just-unique)

Instead of

```
...
use Illuminate\Validation\Rule;
...

public function rules()
{
    return [
        'title' => [
            Rule::unique('containers', 'name')
                ->where('user_id', $this->user()->id)
                ->whereNull('deleted_at'),
        ],

        // other rules
        'type' => Rule::in(['A', 'B']),
        ...
    ];
}

...

```

or with table from model's class

```
...
use App\Container;
use Illuminate\Validation\Rule;
...

public function rules()
{
    return [
        'title' => [
            Rule::unique((new Container::class)->getTable(), 'name')
                ->where('user_id', $this->user()->id)
                ->whereNull('deleted_at'),
        ],

        // other rules
        'type' => Rule::in(['A', 'B']),
        ...
    ];
}

...

```

Use next

```
...
use App\Container;
use ITBrains\Validation\Rule;
...

public function rules()
{
    return [
        'title' => [
            Rule::uniqueModel(Container::class, 'name')
                ->where('user_id', $this->user()->id),

            // other rules
            'type' => Rule::in(['A', 'B']),
            ...
        ],
    ];
}

...

```

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance42

Moderate activity, may be stable

Popularity24

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 73.7% 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 ~245 days

Recently: every ~365 days

Total

13

Last Release

484d ago

### Community

Maintainers

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

---

Top Contributors

[![dragg](https://avatars.githubusercontent.com/u/3448384?v=4)](https://github.com/dragg "dragg (14 commits)")[![Zoidberg315](https://avatars.githubusercontent.com/u/25123541?v=4)](https://github.com/Zoidberg315 "Zoidberg315 (2 commits)")[![ArtemAmiragyan](https://avatars.githubusercontent.com/u/42753090?v=4)](https://github.com/ArtemAmiragyan "ArtemAmiragyan (1 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![dpsw](https://avatars.githubusercontent.com/u/6397667?v=4)](https://github.com/dpsw "dpsw (1 commits)")

### Embed Badge

![Health badge](/badges/it-brains-laravel-validator/health.svg)

```
[![Health](https://phpackages.com/badges/it-brains-laravel-validator/health.svg)](https://phpackages.com/packages/it-brains-laravel-validator)
```

###  Alternatives

[livewire/livewire

A front-end framework for Laravel.

23.6k89.0M2.7k](/packages/livewire-livewire)[yajra/laravel-oci8

Oracle DB driver for Laravel via OCI8

8793.2M25](/packages/yajra-laravel-oci8)[wendelladriel/laravel-validated-dto

Data Transfer Objects with validation for Laravel applications

762649.9k18](/packages/wendelladriel-laravel-validated-dto)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9762.4M131](/packages/roots-acorn)[flarum/core

Delightfully simple forum software.

201.4M2.3k](/packages/flarum-core)[wearepixel/laravel-cart

A cart implementation for Laravel

1374.8k](/packages/wearepixel-laravel-cart)

PHPackages © 2026

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