PHPackages                             madeitbelgium/laravel-email-domain-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. [Mail &amp; Notifications](/categories/mail)
4. /
5. madeitbelgium/laravel-email-domain-validation

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

madeitbelgium/laravel-email-domain-validation
=============================================

PHP Laravel Email domain validator

1.6.0(3mo ago)1968.2k↓45.5%7LGPL-3.0-or-laterPHPPHP &gt;=5.6CI failing

Since Jun 19Pushed 3mo ago3 watchersCompare

[ Source](https://github.com/madeITBelgium/Laravel-Email-Domain-Validation)[ Packagist](https://packagist.org/packages/madeitbelgium/laravel-email-domain-validation)[ Docs](http://www.madeit.be)[ GitHub Sponsors](https://github.com/madeitbelgium)[ RSS](/packages/madeitbelgium-laravel-email-domain-validation/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (10)Dependencies (12)Versions (15)Used By (0)

PHP Laravel E-mail domain validator
===================================

[](#php-laravel-e-mail-domain-validator)

[![Build Status](https://camo.githubusercontent.com/de36e6ceae7dc84a3c8b093e1fc2cc27257eb781ab1c955f727318a4acd3939e/68747470733a2f2f7472617669732d63692e6f72672f6d616465495442656c6769756d2f4c61726176656c2d456d61696c2d446f6d61696e2d56616c69646174696f6e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/madeITBelgium/Laravel-Email-Domain-Validation)[![Coverage Status](https://camo.githubusercontent.com/7a73c4d341ced003deec4d52253e57ad46eb5072a25154fdfa6e7e54c0e5bf00/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f6d616465495442656c6769756d2f4c61726176656c2d456d61696c2d446f6d61696e2d56616c69646174696f6e2f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/madeITBelgium/Laravel-Email-Domain-Validation?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/022e536741958883d9bf459a577efb27bc18374bafe39222ff5cf250fa596b93/68747470733a2f2f706f7365722e707567782e6f72672f6d616465495442656c6769756d2f4c61726176656c2d456d61696c2d446f6d61696e2d56616c69646174696f6e2f762f737461626c652e737667)](https://packagist.org/packages/madeITBelgium/Laravel-Email-Domain-Validation)[![Latest Unstable Version](https://camo.githubusercontent.com/6d69de7d1a5f3a77a54ad65b09a4d5f15b8650a8060d0b3744415f3fdbb0e5e4/68747470733a2f2f706f7365722e707567782e6f72672f6d616465495442656c6769756d2f4c61726176656c2d456d61696c2d446f6d61696e2d56616c69646174696f6e2f762f756e737461626c652e737667)](https://packagist.org/packages/madeITBelgium/Laravel-Email-Domain-Validation)[![Total Downloads](https://camo.githubusercontent.com/aa177ffa227d404414c440c33d3b8bc5f858c89d6bd24395c63c58a1cdd36a28/68747470733a2f2f706f7365722e707567782e6f72672f6d616465495442656c6769756d2f4c61726176656c2d456d61696c2d446f6d61696e2d56616c69646174696f6e2f642f746f74616c2e737667)](https://packagist.org/packages/madeITBelgium/Laravel-Email-Domain-Validation)[![License](https://camo.githubusercontent.com/5cef2f89dc605d0a1fe233fefa3af2a00442997cd2f6b40189d109bf11a72d96/68747470733a2f2f706f7365722e707567782e6f72672f6d616465495442656c6769756d2f4c61726176656c2d456d61696c2d446f6d61696e2d56616c69646174696f6e2f6c6963656e73652e737667)](https://packagist.org/packages/madeITBelgium/Laravel-Email-Domain-Validation)

With this Laravel package you can validate email input that it contains or not contains a specific domainname. This is useful to create a registration to restrict registrions for the company email domain.

Installation
============

[](#installation)

Require this package.

```
composer require madeitbelgium/laravel-email-domain-validation
```

or add in your `composer.json` and update composer.

```
"madeitbelgium/laravel-email-domain-validation": "1.*"
```

After updating composer, add the ServiceProvider to the providers array in `config/app.php`

```
MadeITBelgium\EmailDomainValidation\EmailDomainServiceProvider::class,
```

You can use the facade for shorter code. Add this to your aliases:

```
'EmailDomainValidation' => MadeITBelgium\EmailDomainValidation\EmailDomainFacade::class,
```

Documentation
=============

[](#documentation)

Usage
-----

[](#usage)

```
$emailDomain = new EmailDomain('info@madeit.be', ['madeit.be'], ['tpweb.org']);
$emailDomain->isEmailValid() //Checks if the given e-mail address is valid
$emailDomain->areAllowedDomainsValid(); //Check if the given allowed domains are valid
$emailDomain->areNotAllowedDomainsValid()

$emailDomain->isEmailAllowed() //Check if the email address is allowed.
$emailDomain->isEmailAllowed('info@madeit.be', ['madeit.be'], ['example.com']));
```

Laravel validator
-----------------

[](#laravel-validator)

```
public function store(Request $request) {
    $this->validate($request, ['email' => 'required|email|domain:madeit.be,hotmail.com|domainnot:gmail.com,yahoo.com']);
}
```

The complete documentation can be found at:

Support
=======

[](#support)

Support github or mail:

Contributing
============

[](#contributing)

Please try to follow the psr-2 coding style guide.

License
=======

[](#license)

This package is licensed under LGPL. You are free to use it in personal and commercial projects. The code can be forked and modified, but the original copyright author should always be included!

###  Health Score

55

—

FairBetter than 97% of packages

Maintenance82

Actively maintained with recent releases

Popularity40

Moderate usage in the ecosystem

Community18

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 88.6% 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 ~246 days

Recently: every ~500 days

Total

14

Last Release

98d ago

### Community

Maintainers

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

---

Top Contributors

[![madeITBelgium](https://avatars.githubusercontent.com/u/20304892?v=4)](https://github.com/madeITBelgium "madeITBelgium (62 commits)")[![wit3](https://avatars.githubusercontent.com/u/5450259?v=4)](https://github.com/wit3 "wit3 (2 commits)")[![algm](https://avatars.githubusercontent.com/u/146385?v=4)](https://github.com/algm "algm (2 commits)")[![yekta-kalantary](https://avatars.githubusercontent.com/u/26902978?v=4)](https://github.com/yekta-kalantary "yekta-kalantary (1 commits)")[![paulo-epi](https://avatars.githubusercontent.com/u/72014039?v=4)](https://github.com/paulo-epi "paulo-epi (1 commits)")[![janyksteenbeek](https://avatars.githubusercontent.com/u/3578636?v=4)](https://github.com/janyksteenbeek "janyksteenbeek (1 commits)")[![paul-pti](https://avatars.githubusercontent.com/u/72014039?v=4)](https://github.com/paul-pti "paul-pti (1 commits)")

---

Tags

hacktoberfestlaravelemaildomainname

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/madeitbelgium-laravel-email-domain-validation/health.svg)

```
[![Health](https://phpackages.com/badges/madeitbelgium-laravel-email-domain-validation/health.svg)](https://phpackages.com/packages/madeitbelgium-laravel-email-domain-validation)
```

###  Alternatives

[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

77022.3M151](/packages/laravel-mcp)[propaganistas/laravel-disposable-email

Disposable email validator

6023.0M6](/packages/propaganistas-laravel-disposable-email)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[illuminate/database

The Illuminate Database package.

2.8k54.9M11.6k](/packages/illuminate-database)[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M194](/packages/laravel-ai)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9762.4M131](/packages/roots-acorn)

PHPackages © 2026

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