PHPackages                             mazbaul/comp - 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. [Database &amp; ORM](/categories/database)
4. /
5. mazbaul/comp

ActiveLibrary[Database &amp; ORM](/categories/database)

mazbaul/comp
============

Custom Laravel Validator For Composite Key Validation

321PHP

Since Jul 27Pushed 5y ago1 watchersCompare

[ Source](https://github.com/Mazbaul/comp)[ Packagist](https://packagist.org/packages/mazbaul/comp)[ RSS](/packages/mazbaul-comp/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

composite\_unique Validator Rule For Laravel
============================================

[](#composite_unique-validator-rule-for-laravel)

This package contains composite key validation rule for Laravel, that allows for validation of multi-column UNIQUE indexes.

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

[](#installation)

Install the package through [Composer](http://getcomposer.org). On the command line:

```
composer require mazbaul/comp

```

Configuration
-------------

[](#configuration)

Add the following to your `providers` array in `config/app.php`:

```
'providers' => [
    // ...

    Mazbaul\Comp\CompServiceProvider::class,
],
```

Usage
-----

[](#usage)

Use it like any `Validator` rule:

```
$validator = Validator::make($request->all(), [

      "" =>'required|composite_unique:,,',
    ]);
```

See the [Validation documentation](http://laravel.com/docs/validation) of Laravel.

### Ignore existing row (useful when updating)

[](#ignore-existing-row-useful-when-updating)

You can also specify a row id to ignore (useful to solve unique constraint when updating)

This will ignore row with id 2

```
$validator = Validator::make($request->all(), [

      "" =>'required|composite_unique:,,,ignore--'.$id,
    ]);
```

License
=======

[](#license)

MIT

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/59e907b6710511a733a7ea504ef53928a5de28fd5903220ac1576e62f96356d9?d=identicon)[Mazbaul](/maintainers/Mazbaul)

---

Top Contributors

[![Mazbaul](https://avatars.githubusercontent.com/u/8048926?v=4)](https://github.com/Mazbaul "Mazbaul (10 commits)")

---

Tags

composite-keydatabaselaravellaravel-packagephpvalidation

### Embed Badge

![Health badge](/badges/mazbaul-comp/health.svg)

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

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M546](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)

PHPackages © 2026

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