PHPackages                             andrey-helldar/strong-password - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. andrey-helldar/strong-password

AbandonedArchivedLibrary[Validation &amp; Sanitization](/categories/validation)

andrey-helldar/strong-password
==============================

This package provides a validator for ensuring strong passwords in Laravel applications

v1.7.1(5y ago)173.3kMITPHPPHP ^7.1.3|^8.0

Since Apr 29Pushed 4y ago1 watchersCompare

[ Source](https://github.com/TheDragonCode/strong-password)[ Packagist](https://packagist.org/packages/andrey-helldar/strong-password)[ Fund](https://money.yandex.ru/to/410012115955701)[ Fund](https://paypal.me/helldar)[ RSS](/packages/andrey-helldar-strong-password/feed)WikiDiscussions main Synced today

READMEChangelog (10)Dependencies (6)Versions (13)Used By (0)

Laravel Strong Password
=======================

[](#laravel-strong-password)

[![Laravel Strong Password](https://camo.githubusercontent.com/71f6afe51bf193618205b310619c32110b0744d71094e93d31f6c1e6be9d5586/68747470733a2f2f707265766965772e647261676f6e2d636f64652e70726f2f546865447261676f6e436f64652f7374726f6e672d70617373776f72642e7376673f6272616e643d6c61726176656c)](https://camo.githubusercontent.com/71f6afe51bf193618205b310619c32110b0744d71094e93d31f6c1e6be9d5586/68747470733a2f2f707265766965772e647261676f6e2d636f64652e70726f2f546865447261676f6e436f64652f7374726f6e672d70617373776f72642e7376673f6272616e643d6c61726176656c)

This package provides a validator for ensuring strong passwords in Laravel applications.

[![StyleCI Status](https://camo.githubusercontent.com/f85f0208efebdc65ce3c716881d64b9b71dd0a605684a6e9a1ace79e0fdc268c/68747470733a2f2f7374796c6563692e696f2f7265706f732f3133303639383036382f736869656c64)](https://github.styleci.io/repos/184076269)[![Github Workflow Status](https://camo.githubusercontent.com/5f3d0c92e4548e52df327f6cf44edbb2c3cb36e4db9a56e480644da24e4ef2b2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f616e647265792d68656c6c6461722f7374726f6e672d70617373776f72642f706870756e69743f7374796c653d666c61742d737175617265)](https://github.com/andrey-helldar/strong-password/actions)[![For Laravel](https://camo.githubusercontent.com/f56fc6470fafc90f71c839bbdb1092cc6ac862c7d218f54d3ad60c96e1db734f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d352e352b253230253743253230362e78253230253743253230372e78253230253743253230382e782d6f72616e67652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/andrey-helldar/strong-password)

[![Stable Version](https://camo.githubusercontent.com/dafc65b519edd0ecb5c0b8cbac4c8a06d1a60c04bbee69800a80e0643c3eb282/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f616e647265792d68656c6c6461722f7374726f6e672d70617373776f72643f6c6162656c3d737461626c65267374796c653d666c61742d737175617265)](https://packagist.org/packages/andrey-helldar/strong-password)[![Unstable Version](https://camo.githubusercontent.com/b842dab29abdb0f93349e795496f472d7748d125ec7b784b03ae526d1ee9aea2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f756e737461626c652d6465762d2d6d61737465722d6f72616e67653f7374796c653d666c61742d737175617265)](https://packagist.org/packages/andrey-helldar/strong-password)[![Total Downloads](https://camo.githubusercontent.com/ab53fb6abea7226f1fcf7770c72d8a207b535862c035c86b518474ec39fa21e9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616e647265792d68656c6c6461722f7374726f6e672d70617373776f72642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/andrey-helldar/strong-password)[![License](https://camo.githubusercontent.com/191d0d105db23993baeb95d5e0d5269eb98a1355db0ce24db9c4dabf829ae6ea/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f616e647265792d68656c6c6461722f7374726f6e672d70617373776f72642e7376673f7374796c653d666c61742d737175617265)](LICENSE)

> In Laravel, since version [8.39.0](https://github.com/laravel/framework/releases/tag/v8.39.0), you can use the standard [password](https://laravel.com/docs/validation#validating-passwords) functionality ([\#36960](https://github.com/laravel/framework/pull/36960)).

Installation
------------

[](#installation)

To get the latest version of Laravel Strong Password, simply require the project using [Composer](https://getcomposer.org):

```
$ composer require andrey-helldar/strong-password
```

Or manually update `require` block of `composer.json` and run `composer update`.

```
{
    "require-dev": {
        "andrey-helldar/strong-password": "^1.0"
    }
}
```

If you don't use auto-discovery, add the ServiceProvider to the providers array in `app/Providers/AppServiceProvider.php`:

```
public function register()
{
    $this->app->register(\Helldar\StrongPassword\ServiceProvider::class);
}
```

You can also publish the config file to change implementations (ie. interface to specific class):

```
php artisan vendor:publish --provider="Helldar\StrongPassword\ServiceProvider"

```

Usage
-----

[](#usage)

### Rules

[](#rules)

Now, a `Validator` facade is extended by few rules:

- `psw_letters` - The field must include at least one letter.
- `psw_case_diff` - The field must include both upper and lower case letters.
- `psw_numbers` - The field must include at least one number.
- `psw_symbols` - The field must include at least one symbol.
- `psw_min_length` - The field must be at least ten characters.
- `psw_strong` - The field must contain at least two characters in the lower and upper registers, at least one digit and a special character, and at least ten characters (include all rules: `psw_letters`, `psw_case_diff`, `psw_numbers`, `psw_symbols` and `psw_min_length`).

```
// 1
$validator = \Validator::make(['foo' => 'qwerty'], ['foo' => 'psw_letters']);
$validator->passes(); // return `true`

// 2
$validator = \Validator::make(['bar' => 'qwerty'], ['bar' => 'psw_case_diff']);
$validator->passes(); // return `false`

// 3
$validator = \Validator::make(['baz' => 'qweRTY123!#'], ['baz' => 'psw_strong']);
$validator->passes(); // return `true`

// 4
$validator = \Validator::make(['baz' => 'qweRTY123!#'], ['baz' => 'psw_letters|psw_min_length']);
$validator->passes(); // return `true`
```

### Validation in context

[](#validation-in-context)

You can also perform condition checking inside your code by accessing the `Password` facade:

```
use Helldar\StrongPassword\Facades\Password;

return Password::validate('qwerty');

return Password::errors('qwerty');

return Password::isAllow('qwerty');
```

For example, we will define the following rules in the [config/strong-password.php](config/strong-password.php) file:

```
return [
    'min_length' => 27,

    'rules' => [
        'psw_letters',
        'psw_numbers',
        'psw_min_length',
    ],
];
```

Thus, we will get the following results:

```
$password = 'qwerty';

return Password::validate($password);
// throw ValidationException

return Password::errors($password);
// return array:
// [
//     'password' => [
//         'The password must include at least one number.',
//         'The password must be at least twenty-seven characters.',
//     ]
// ]

return Password::isAllow($password);
// return false
```

and

```
$password = 'qWeRtYuIoP[]#!123qWeRtYuIqwd';

return Password::validate($password);
// [
//     'password' => 'qWeRtYuIoP[]#!123qWeRtYuIqwd'
// ]

return Password::errors($password);
// return null

return Password::isAllow($password);
// return true
```

License
-------

[](#license)

This package is licensed under the [MIT License](LICENSE).

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~55 days

Recently: every ~7 days

Total

12

Last Release

1956d ago

PHP version history (2 changes)v1.0.0PHP ^7.1.3

v1.5.0PHP ^7.1.3|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/b77790e612f1c9beed1e1533e36eba4954fbd6da2a5c9f71e845cd0f5465f0ad?d=identicon)[Helldar](/maintainers/Helldar)

---

Top Contributors

[![andrey-helldar](https://avatars.githubusercontent.com/u/10347617?v=4)](https://github.com/andrey-helldar "andrey-helldar (2 commits)")

---

Tags

laravelvalidationsecuritypasswordstrongpasswordsstrength

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/andrey-helldar-strong-password/health.svg)

```
[![Health](https://phpackages.com/badges/andrey-helldar-strong-password/health.svg)](https://phpackages.com/packages/andrey-helldar-strong-password)
```

###  Alternatives

[propaganistas/laravel-phone

Adds phone number functionality to Laravel based on Google's libphonenumber API.

3.0k35.7M106](/packages/propaganistas-laravel-phone)[proengsoft/laravel-jsvalidation

Validate forms transparently with Javascript reusing your Laravel Validation Rules, Messages, and FormRequest

1.1k2.3M49](/packages/proengsoft-laravel-jsvalidation)[axlon/laravel-postal-code-validation

Worldwide postal code validation for Laravel and Lumen

3853.3M1](/packages/axlon-laravel-postal-code-validation)[watson/validating

Eloquent model validating trait.

9723.3M47](/packages/watson-validating)[wendelladriel/laravel-validated-dto

Data Transfer Objects with validation for Laravel applications

759569.4k13](/packages/wendelladriel-laravel-validated-dto)[laravel-validation-rules/credit-card

Validate credit card number, expiration date, cvc

2412.2M5](/packages/laravel-validation-rules-credit-card)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
