PHPackages                             usercheck/usercheck-laravel - 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. usercheck/usercheck-laravel

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

usercheck/usercheck-laravel
===========================

Laravel validation rule for UserCheck API

v0.5.0(11mo ago)53.2k↑125%3MITPHPPHP ^8.0CI passing

Since Sep 19Pushed 11mo ago1 watchersCompare

[ Source](https://github.com/usercheckhq/usercheck-laravel)[ Packagist](https://packagist.org/packages/usercheck/usercheck-laravel)[ Docs](https://github.com/usercheckhq/usercheck-laravel)[ RSS](/packages/usercheck-usercheck-laravel/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (6)Dependencies (11)Versions (8)Used By (0)

UserCheck for Laravel
=====================

[](#usercheck-for-laravel)

[![Latest Stable Version](https://camo.githubusercontent.com/4c30928c357aabf155a838b14e47366d5a45bd041a24ade5a914c5fe72e32612/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f75736572636865636b2f75736572636865636b2d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/usercheck/usercheck-laravel)[![Total Downloads](https://camo.githubusercontent.com/e3d867e8ff85de4e05c36308ef3e03b73748df13d2c7ff30841f5e0e7cdc3d26/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f75736572636865636b2f75736572636865636b2d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/usercheck/usercheck-laravel)[![License](https://camo.githubusercontent.com/f9ba76d1eb22ff3d6f4de8391d9441d7c67941bd97afed18dd13448fb7bd1898/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f75736572636865636b2f75736572636865636b2d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/usercheck/usercheck-laravel)[![Tests Status](https://camo.githubusercontent.com/f7293c3a3e9d964e6a286087d3305d8fa12e3a50eeb0671342b8583d3cb3b10a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f75736572636865636b68712f75736572636865636b2d6c61726176656c2f74657374732e796d6c3f6c6162656c3d7465737473266272616e63683d6d61696e267374796c653d666c61742d737175617265)](https://github.com/usercheckhq/usercheck-laravel/actions)

A Laravel package for validating email addresses using the [UserCheck.com](https://www.usercheck.com) API.

✨ Features
----------

[](#-features)

- Block disposable email addresses with an always up-to-date API
- Validate email addresses
- Check for MX records
- Identify personal email addresses
- Block email forwarding services
- Block domains marked as spam
- Blocks custom domains (Paid plans only)
- Customizable validation rules
- Laravel Facade for easy use
- Localization support

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

[](#requirements)

- PHP 8.0+
- Laravel 11.0+

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

[](#installation)

Install the package via Composer:

```
composer require usercheck/usercheck-laravel
```

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

[](#configuration)

Add your UserCheck API key to your `.env` file:

```
USERCHECK_API_KEY=your_api_key_here
```

You can obtain a free API key by signing up at .

Usage
-----

[](#usage)

Use the `usercheck` rule in your Laravel validation:

```
$request->validate([
    'email' => 'required|email|usercheck'
]);
```

### Options

[](#options)

By default, the `usercheck` rule will only validate the email address's syntax using the UserCheck API. If the email is invalid, the validation will fail.

The `usercheck` rule accepts several parameters:

- `block_disposable`: Fails validation if the email is from a disposable email provider
- `block_no_mx`: Fails validation if the domain has no MX records
- `block_public_domain`: Fails validation for public email domains (e.g., Gmail, Yahoo). Great to prevent users from signing up with their personal email addresses.
- `block_relay_domain`: Blocks email addresses from email forwarding services
- `block_spam`: Blocks email addresses from domains that have been marked as spam
- `domain_only`: Validates only the domain part of the email. Great for privacy; only the domain will be sent to the API.
- `block_blocklisted`: (Paid plans only) Blocks domains from your custom blocklist.

You can combine these options to create a custom validation rule:

```
$request->validate([
    'email' => 'required|email|usercheck:domain_only,block_disposable,block_no_mx,block_spam',
]);
```

### Using the Facade

[](#using-the-facade)

You can also use the UserCheck facade directly:

```
use UserCheck\Laravel\Facades\UserCheck;
$result = UserCheck::validateEmail('test@example.com');
$result = UserCheck::validateDomain('example.com');
```

Both methods return an array with `is_valid` and `error_code` keys.

Localization
------------

[](#localization)

The package includes English translations by default. To customize the error messages, publish the language files:

```
php artisan vendor:publish --provider="UserCheck\Laravel\UserCheckProvider" --tag="lang"
```

Then, edit the files in `resources/lang/vendor/usercheck`.

Testing
-------

[](#testing)

Run the tests with:

```
composer test
```

Contributing
------------

[](#contributing)

Contributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security-related issues, please email  instead of using the issue tracker.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

Support
-------

[](#support)

For support, please email  or open an issue on GitHub.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance50

Moderate activity, may be stable

Popularity29

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity39

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.

###  Release Activity

Cadence

Every ~49 days

Recently: every ~61 days

Total

6

Last Release

357d ago

PHP version history (2 changes)v0.0.1PHP ^7.4|^8.0

v0.5.0PHP ^8.0

### Community

Maintainers

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

---

Top Contributors

[![tompec](https://avatars.githubusercontent.com/u/17140634?v=4)](https://github.com/tompec "tompec (21 commits)")

---

Tags

email-validationlaravelrulesuserchecklaravelvalidationemaildisposableusercheck

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/usercheck-usercheck-laravel/health.svg)

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

###  Alternatives

[propaganistas/laravel-disposable-email

Disposable email validator

5762.6M6](/packages/propaganistas-laravel-disposable-email)[erag/laravel-disposable-email

A Laravel package to detect and block disposable email addresses.

226102.4k](/packages/erag-laravel-disposable-email)[martian/spammailchecker

A laravel package that protect users from entering non-existing/spam email addresses.

422.0k](/packages/martian-spammailchecker)[osiemsiedem/laravel-autolink

A Laravel package for converting URLs in a given string of text into clickable links.

13126.3k](/packages/osiemsiedem-laravel-autolink)[kouz/laravel-mailgun-email-validation

Laravel email validation that uses the Mailgun API for a three-step validation check.

11141.0k1](/packages/kouz-laravel-mailgun-email-validation)[ashallendesign/laravel-mailboxlayer

A lightweight Laravel package for validating emails using the Mailbox Layer API.

762.0k](/packages/ashallendesign-laravel-mailboxlayer)

PHPackages © 2026

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