New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

jord-jd/laravel-password-exposed-validation-rule

Laravel validation rule that checks if a password has been exposed in a data breach
2,232 89

Larablocks Analysis

jord-jd/laravel-password-exposed-validation-rule works with Laravel 8 to 13 (latest release v6.1.0, Jul 18, 2026).

Laravel 5, 6 and 7 in earlier releases.

Promising: maintained and up to date, meets 2 of 4 checks; not yet widely used.

Named as the replacement for divineomega/laravel-password-exposed-validation-rule.

  • Works with Laravel 13, the current version
  • Released in the last 12 months (Jul 18, 2026)
  • 514 downloads a month (needs 10,000)
  • 89 GitHub stars (needs 100)

State

Actively maintained
  • Last stable release: Jul 18, 2026.
  • 5 releases in the last 12 months.
  • First released: Apr 26, 2018.
  • Monthly downloads: 514.
  • 0 open issues on GitHub.

Data from Packagist and GitHub, checked by Larablocks on Nov 28, 2026.

Install
composer require jord-jd/laravel-password-exposed-validation-rule
Latest Version:v6.1.0
PHP:^7.4||^8.0
Laravel:8 – 13
Older releases:5 · 6 · 7
License:LGPL-3.0-only
Last Updated:Jul 18, 2026
Links: GitHub  ·  Packagist
Maintainer: Jord-JD

🔒 Laravel Password Exposed Validation Rule

This package provides a Laravel validation rule that checks if a password has been exposed in a data breach. It uses the haveibeenpwned.com passwords API via the jord-jd/password_exposed library.

// composer require jord-jd/laravel-password-exposed-validation-rule

use JordJD\LaravelPasswordExposedValidationRule\PasswordNotExposed;

$request->validate([
    'password' => ['required', new PasswordNotExposed()],
]);

Compatibility

  • PHP: 7.4+ and 8.x
  • Laravel: 8.x through 13.x

Installation

To install, just run the following Composer command.

composer require jord-jd/laravel-password-exposed-validation-rule

Please note that this package requires Laravel 8.0 or above.

Usage

The following code snippet shows an example of how to use the password exposed validation rule.

use JordJD\LaravelPasswordExposedValidationRule\PasswordNotExposed;

$request->validate([
    'password' => ['required', new PasswordNotExposed()],
]);

If you wish, you can also set a custom validation message, as shown below.

use JordJD\LaravelPasswordExposedValidationRule\PasswordNotExposed;

$request->validate([
    'password' => ['required', (new PasswordNotExposed())->setMessage('This password is not secure.')],
]);

Backward Compatibility

PasswordExposed remains available as a backwards-compatible alias for PasswordNotExposed.

Testing / Mocking

If you need deterministic tests, you can inject a checker directly or use a resolver.

use JordJD\LaravelPasswordExposedValidationRule\PasswordNotExposed;
use JordJD\PasswordExposed\Interfaces\PasswordExposedCheckerInterface;

$fakeChecker = new class implements PasswordExposedCheckerInterface {
    // Implement interface methods for your test scenario...
};

PasswordNotExposed::resolvePasswordExposedCheckerUsing(function () use ($fakeChecker) {
    return $fakeChecker;
});

Non-string values are left to Laravel's other validation rules, so combine this rule with string when the field must contain text. Objects that implement __toString() are checked normally.

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

670,032,257 9,703
laravel/framework

The Laravel Framework.

640,572,096 35,338
laravel/tinker

Powerful REPL for the Laravel framework.

546,909,908 7,440
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

465,816,364 607
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

431,187,642 4,660

Version History

Version Released PHP Laravel License
v6.1.0 ^7.4||^8.0 ^8.0||^9.0||^10.0||^11.0||^12.0||^13.0 LGPL-3.0-only
v6.0.0 ^7.4||^8.0 ^8.0||^9.0||^10.0||^11.0||^12.0 LGPL-3.0-only
v5.0.1 ^7.1||^8.0||8.1 ^5.1||^6.0||^7.0||^8.0||^9.0 LGPL-3.0-only
v5.0.0 ^7.1||^8.0||8.1 ^5.1||^6.0||^7.0||^8.0||^9.0 LGPL-3.0-only
v4.0.0 ^7.1||^8.0||8.1 ^5.1||^6.0||^7.0||^8.0||^9.0 LGPL-3.0-only