New

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

magentron/laravel-password-exposed-validation-rule

Laravel validation rule that checks if a password has been exposed in a data breach (forked from dilneiss/laravel-password-exposed-validation-rule)
5,363
Install
composer require magentron/laravel-password-exposed-validation-rule
Latest Version:4.1
PHP:^7.4||^8.0
Laravel:5 – 12
License:LGPL-3.0-only
Last Updated:Sep 9, 2025
Links: GitHub  ·  Packagist
Maintainer: Magentron

(forked from dilneiss/laravel-password-exposed-validation-rule)

🔒 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 magentron/password_exposed library.

Travis CI Coverage Status StyleCI

Installation

To install, just run the following Composer command.

composer require magentron/laravel-password-exposed-validation-rule

Please note that this package requires Laravel 5.1 or above.

Usage

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

use DivineOmega\LaravelPasswordExposedValidationRule\PasswordExposed;

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

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

use DivineOmega\LaravelPasswordExposedValidationRule\PasswordExposed;

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

Related Packages

doctrine/dbal

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

651,963,193 9,701
laravel/framework

The Laravel Framework.

604,216,237 34,982
laravel/tinker

Powerful REPL for the Laravel framework.

518,004,183 7,444
laravel/serializable-closure

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

435,097,283 607
nunomaduro/collision

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

407,699,310 4,663

Version History

Version Released PHP Laravel License
4.1 ^7.4||^8.0 ^5.1||^6.0||^7.0||^8.0||^9.0||^10.0||^11.0|^12.0 LGPL-3.0-only
4.0 ^7.1||^8.0 ^5.1||^6.0||^7.0||^8.0||^9.0||^10.0||^11.0|^12.0 LGPL-3.0-only
3.2 ^7.1||^8.0||8.1||8.2 ^5.1||^6.0||^7.0||^8.0||^9.0||^10.0||^11.0 LGPL-3.0-only
3.1 ^7.1||^8.0||8.1||8.2 ^5.1||^6.0||^7.0||^8.0||^9.0||^10.0||^11.0 LGPL-3.0-only
3.0 ^7.1||^8.0||8.1||8.2 ^5.1||^6.0||^7.0||^8.0||^9.0||^10.0 LGPL-3.0-only