Looking to hire Laravel developers? Try LaraJobs

laravel-common-password-validator maintained by wedgehr

Description
Protect your users from using the most common passwords
Last update
2025/06/26 21:03 (dev-main)
License
Downloads
16 336

Comments
comments powered by Disqus

laravel-common-password-validator

Laravel Common Password Validator

An optimized and secure validator to check if a given password is too common.

By default, we ensure password is at least 8 characters, and not one of the 10,000 most common.

Installation

Require the validator:

composer require wedgehr/laravel-common-password-validator

Publish the Migration:

php artisan vendor:publish --provider="Wedge\Validators\CommonPassword\ServiceProvider" --tag=migrations

Optionally publish the config file:

php artisan vendor:publish --provider="Wedge\Validators\CommonPassword\ServiceProvider" --tag=config

Seed the common passwords:

php artisan common-password:seed

Usage

This package installs a custom validator common_pwd which can be used in any Validator.

Additionally, you can manually validate a password as such:

Wedge\Validators\CommonPassword\Facade::isCommonPassword('password');