PHPackages                             antriver/laravel-unique-email-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. antriver/laravel-unique-email-validator

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

antriver/laravel-unique-email-validator
=======================================

Laravel validation rule to check an email address is really unique.

1.0.0(5y ago)010MITPHP

Since Dec 31Pushed 5y ago1 watchersCompare

[ Source](https://github.com/antriver/laravel-unique-email-validator)[ Packagist](https://packagist.org/packages/antriver/laravel-unique-email-validator)[ RSS](/packages/antriver-laravel-unique-email-validator/feed)WikiDiscussions master Synced 3w ago

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

Laravel Unique Email Validator
==============================

[](#laravel-unique-email-validator)

This provides a Laravel validation rule that improves upon the built in 'unique' rule when preventing the same email address being used more than once.

Some email providers (Gmail) allow you to use + in the email address to create 'aliases'. For example if your email address is  you can also use:

-
-
-

and they all work. The normal 'unique' rule would allow these as they are all different. This rule sees these all as the same and will disallow using the same '' account.

Some email providers (Gmail) also allow you to place periods anywhere before the @ sign in the email address and these will all work. For example if your email address is  you can also use:

-
-

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

[](#requirements)

Your MySQL server must support the non-greedy regex operator. This has been tested with MySQL 8 and MariaDB 10.2 so those versions or newer should work.

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

[](#installation)

```
composer require antriver/laravel-unique-email-validator

```

Usage
-----

[](#usage)

```
    $this->validate(
        $request,
        [
            // Check for other use of the same email address in the users.email column.
            'email' => [new \Antriver\LaravelUniqueEmailValidator\UniqueEmailRule('users', 'email')],
        ]
    );
```

Like the original unique rule you can specify certain rows should be excluded. This is useful when updating a user and that should not reject the user's existing registered email address:

```
    $this->validate(
        $request,
        [
            'email' => [new \Antriver\LaravelUniqueEmailValidator\UniqueEmailRule('users', 'email', ['id' => 123])],
            // Where 123 is the 'id' of the existing user.
        ]
    );
```

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

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

2009d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7dc40f9d37443cd47fc0079800c1ea6cee515b4efce4e0dfb942f15969a82a39?d=identicon)[antriver](/maintainers/antriver)

---

Top Contributors

[![antriver](https://avatars.githubusercontent.com/u/251159?v=4)](https://github.com/antriver "antriver (8 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/antriver-laravel-unique-email-validator/health.svg)

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

###  Alternatives

[backpack/crud

Quickly build admin interfaces using Laravel, Bootstrap and JavaScript.

3.4k3.7M223](/packages/backpack-crud)[unopim/unopim

UnoPim Laravel PIM

10.5k2.4k](/packages/unopim-unopim)[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135224.7k7](/packages/statamic-rad-pack-runway)[ecotone/laravel

Ecotone for Laravel — CQRS, Event Sourcing, Sagas, Durable Workflows, and Outbox on top of Laravel Queue, via PHP attributes.

21318.6k3](/packages/ecotone-laravel)[carsdotcom/laravel-json-schema

Json Schema validation for Laravel projects

1043.3k6](/packages/carsdotcom-laravel-json-schema)[duncanmcclean/statamic-cargo

Comprehensive e-commerce addon for Statamic. Build bespoke e-commerce sites without the complexity.

3416.6k](/packages/duncanmcclean-statamic-cargo)

PHPackages © 2026

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