Laravel validation rule that checks if a password has been exposed in a data breach (forked from dilneiss/laravel-password-exposed-validation-rule)
caseraph/laravel-password-exposed-validation-rule is a Laravel package for laravel validation rule that checks if a password has been exposed in a data breach (forked from dilneiss/laravel-password-exposed-validation-rule).
It currently has 0 GitHub stars and 1.501 downloads on Packagist (latest version v1.0.0).
Install it with composer require caseraph/laravel-password-exposed-validation-rule.
Discover more Laravel packages by caseraph
or browse all Laravel packages to compare alternatives.
Last updated
(forked from magentron/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.
To install, just run the following Composer command.
composer require caseraph/laravel-password-exposed-validation-rule
Please note that this package requires Laravel 5.1 or above.
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.')],
]);