Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wterberg/laravel-no-common-passwords
Provides Laravel validation rules to check passwords against a list of commonly used passwords.
https://github.com/wterberg/laravel-no-common-passwords
laravel password-strength validation
Last synced: about 1 month ago
JSON representation
Provides Laravel validation rules to check passwords against a list of commonly used passwords.
- Host: GitHub
- URL: https://github.com/wterberg/laravel-no-common-passwords
- Owner: WterBerg
- License: mit
- Created: 2023-08-16T21:52:19.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-10T11:37:25.000Z (about 2 months ago)
- Last Synced: 2024-12-19T15:51:15.102Z (about 1 month ago)
- Topics: laravel, password-strength, validation
- Language: PHP
- Homepage:
- Size: 221 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# WterBerg / Laravel No Common Passwords
[github.com/WterBerg/laravel-no-common-passwords](https://github.com/WterBerg/laravel-no-common-passwords)
Provides [Laravel](https://laravel.com/) validation rules to check passwords against a [list of commonly used passwords](https://github.com/wikimedia/mediawiki-libs-CommonPasswords).
## License
View the `LICENSE.md` file for licensing details.
## Installation
Installation of [`wterberg/laravel-no-common-passwords`](https://packagist.org/packages/wterberg/laravel-no-common-passwords) is done via [Composer](https://getcomposer.org).
```shell
composer require wterberg/laravel-no-common-passwords
```## Usage
Simply register the provided validation rules in your Laravel Validator instances.
```php
use WterBerg\Laravel\NoCommonPasswords\Rules\NoCommonPassword;...
$validator = Validator::make(
$dataToValidate,
['password' => ['required', 'string', 'min:8', new NoCommonPassword()]]
);
```## Translations
This project uses the following translatable strings:
| Translatable strings |
|-------------------------------------|
| "Common passwords are not allowed." |Note: The project provides no translation files. Consuming projects are free to provide their own translations for the languages that are relevant.