Package Data | |
---|---|
Maintainer Username: | DivineOmega |
Maintainer Contact: | jordan@hall05.co.uk (Jordan Hall) |
Package Create Date: | 2018-04-26 |
Package Last Update: | 2023-01-31 |
Home Page: | |
Language: | PHP |
License: | LGPL-3.0-only |
Last Refreshed: | 2024-12-15 03:04:54 |
Package Statistics | |
---|---|
Total Downloads: | 651,708 |
Monthly Downloads: | 6,333 |
Daily Downloads: | 80 |
Total Stars: | 90 |
Total Watchers: | 8 |
Total Forks: | 31 |
Total Open Issues: | 3 |
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 divineomega/password_exposed
library.
To install, just run the following Composer command.
composer require divineomega/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.')],
]);