PHPackages                             xunextw/password-strength - 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. xunextw/password-strength

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

xunextw/password-strength
=========================

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

1.14.3(6y ago)07MITPHPPHP &gt;=5.4.0

Since Nov 8Pushed 6y agoCompare

[ Source](https://github.com/xuneXTW/PasswordStrengthPackage)[ Packagist](https://packagist.org/packages/xunextw/password-strength)[ RSS](/packages/xunextw-password-strength/feed)WikiDiscussions 1.x Synced 4w ago

READMEChangelog (4)Dependencies (4)Versions (34)Used By (0)

PasswordStrength Package
========================

[](#passwordstrength-package)

[![Build Status](https://camo.githubusercontent.com/67e3cfbf8ef77002615f1aba71e53bc22e3f4778097f183624e9389f6ae4f397/68747470733a2f2f7472617669732d63692e6f72672f7363687570706f2f50617373776f7264537472656e6774685061636b6167652e706e673f6272616e63683d312e78)](https://travis-ci.org/schuppo/PasswordStrengthPackage)[![Total Downloads](https://camo.githubusercontent.com/cd0193dc332762255f609cca8335f443a3f8a43bbccac349956f8fd028b6fda2/68747470733a2f2f706f7365722e707567782e6f72672f7363687570706f2f70617373776f72642d737472656e6774682f646f776e6c6f616473)](https://packagist.org/packages/schuppo/password-strength)[![License](https://camo.githubusercontent.com/62763962a02b85a16bfbfe3991b89ff20493c4db9f9f2dfd1f58b44b7279f010/68747470733a2f2f706f7365722e707567782e6f72672f7363687570706f2f70617373776f72642d737472656e6774682f6c6963656e7365)](https://packagist.org/packages/schuppo/password-strength)

This package provides a validator that ensures strong passwords in Laravel 4 &amp; 5 applications. It is influenced a lot by [PasswordStrengthBundle for Symfony 2](https://github.com/jbafford/PasswordStrengthBundle).

It is out now for a while and since there were no complaints it very likely fulfills its purpose.

The provided validations include:

- check if input contains alphabetic characters
- check if input contains numeric characters
- check if input contains mixed case characters
- check if input contains symbols

Documentation
=============

[](#documentation)

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

[](#installation)

### Get the package

[](#get-the-package)

**For Laravel 4 users**

Just `composer require schuppo/password-strength:"~0.10"`.

**For Laravel 5 users**

Just `composer require schuppo/password-strength:"~1.5"`.

### Initialize the package

[](#initialize-the-package)

> If you do run the package on Laravel 5.5+, you can start using the package at this point. [package auto-discovery](https://medium.com/@taylorotwell/package-auto-discovery-in-laravel-5-5-ea9e3ab20518) takes care of the magic of adding the service provider.

If you do not run Laravel 5.5 (or higher), then add the following line under the `providers` array key in *app/config.php*:

```
// app/config/app.php
return array(
    // ...
    'providers' => array(
        // ...
        \Schuppo\PasswordStrength\PasswordStrengthServiceProvider::class,
    );
    // ...
);
```

**Caution**

I recently recognized a small conflict in the usage of this package in combination with [unique-with](https://github.com/felixkiss/uniquewith-validator): One runs into problems when adding the `PasswordStrengthServiceProvider` **after** `UniqueWithValidatorServiceProvider` to the providers array, the rules of this package stay unknown to the Laravel `Validator`.

The problem is easy to fix though: Just add the service provider of this package in front of the service provider of *unique-with*. In that order both packages work fine.

Usage
-----

[](#usage)

Now Laravel's native `Validator` is extended by four rules:

- case\_diff
- numbers
- letters
- symbols

### Example

[](#example)

You can apply these rules as described in the [validation section on Laravel's website](http://laravel.com/docs/validation)

```
$v = Validator::make(array(
    'password' => '12345QWERTqwert@',
    'password' => 'case_diff|numbers|letters|symbols'
));
$v->passes();   // returns true;
```

Notice that you can validate any value with the new rules. The only reason why this package is called "Password Strength Package" is that it describes its foremost purpose.

History
=======

[](#history)

**\[Laravel 5 / Laravel 4\]**

**\[1.11/-\]**

Simplifies symbol validation

**\[1.10/0.15\]**

Adds Chinese and Spanish translation

**\[1.9/0.14\]**

Improves Polish translation

**\[1.8/0.13\]**

Adds Arabic translation

**\[1.7/0.12\]**

Adds Czech translation

**\[1.6/0.11\]**

- Adds Russian translation

**\[1.5/0.10\]**

- Adds unicode flag to case difference validation rule

**\[1.4/0.9\]**

- Adds Dutch translation
- Updates French translation
- Makes packages php7 ready

**\[1.3/0.8.2\]**

Adds Romanian translation

**\[1.2/0.8.1\]**

Adds Polish translation

**\[1.1/0.8\]**

Adds French translation

**\[1.0.2/0.7\]**

Updates README.md

**\[1.0.1\]**

Make package laravel 5 ready

**\[0.6\]**

- New validation rule to check if input contains symbols. Thanks to [closca](https://github.com/closca) for providing this new feature.

**\[0.5.3\]**

- Added new version to composer.json

**\[0.5.2\]**

- Small changes in README.md

**\[0.5.1\]**

- Minimum requirement (PHP 5.4 because of array chains) is now recognized by composer.json

**\[0.4.1\]**

- The package works properly now when other extensions of laravel's validator are used as well (like [unique-with](https://github.com/felixkiss/uniquewith-validator)).
- The package is able to take localization overwrites now as described in the [laravel docs](http://laravel.com/docs/localization#overriding-package-language-files)

**\[0.3.1\]**

- Fixed: Package validator doesn't overwrite custom validation errror messages any more. Not functional tested though because I have no clue how to set up a test which controls the passing of variables from the password strength package to the native validator INSIDE the package's test folders. Any suggestions?

License
=======

[](#license)

This package is under the MIT license. See the complete license:

- [LICENSE](https://github.com/schuppo/PasswordStrengthPackage/LICENSE)

Reporting Issues or Feature Requests
------------------------------------

[](#reporting-issues-or-feature-requests)

Issues and feature requests are tracked on [GitHub](https://github.com/schuppo/PasswordStrengthPackage/issues).

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor3

3 contributors hold 50%+ of commits

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 ~59 days

Recently: every ~0 days

Total

33

Last Release

2314d ago

Major Versions

0.9 → 1.4.12015-12-12

0.11 → 1.62016-01-23

0.12 → v1.82016-09-01

v0.13 → v1.92016-10-05

v0.15 → v1.102017-10-12

### Community

Maintainers

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

---

Top Contributors

[![schuppo](https://avatars.githubusercontent.com/u/3538297?v=4)](https://github.com/schuppo "schuppo (12 commits)")[![xuneXTW](https://avatars.githubusercontent.com/u/26743261?v=4)](https://github.com/xuneXTW "xuneXTW (5 commits)")[![Dalabad](https://avatars.githubusercontent.com/u/2007311?v=4)](https://github.com/Dalabad "Dalabad (5 commits)")[![trideout](https://avatars.githubusercontent.com/u/3935944?v=4)](https://github.com/trideout "trideout (3 commits)")[![DCzajkowski](https://avatars.githubusercontent.com/u/4501047?v=4)](https://github.com/DCzajkowski "DCzajkowski (3 commits)")[![kduma](https://avatars.githubusercontent.com/u/1062582?v=4)](https://github.com/kduma "kduma (2 commits)")[![salkhwlani](https://avatars.githubusercontent.com/u/10876587?v=4)](https://github.com/salkhwlani "salkhwlani (2 commits)")[![bmichotte](https://avatars.githubusercontent.com/u/235510?v=4)](https://github.com/bmichotte "bmichotte (1 commits)")[![bobbybouwmann](https://avatars.githubusercontent.com/u/5872362?v=4)](https://github.com/bobbybouwmann "bobbybouwmann (1 commits)")[![Fl0ux](https://avatars.githubusercontent.com/u/545615?v=4)](https://github.com/Fl0ux "Fl0ux (1 commits)")[![SilvanLaroo](https://avatars.githubusercontent.com/u/1763934?v=4)](https://github.com/SilvanLaroo "SilvanLaroo (1 commits)")[![snipe](https://avatars.githubusercontent.com/u/197404?v=4)](https://github.com/snipe "snipe (1 commits)")[![closca](https://avatars.githubusercontent.com/u/4892901?v=4)](https://github.com/closca "closca (1 commits)")[![JeroenDeDauw](https://avatars.githubusercontent.com/u/146040?v=4)](https://github.com/JeroenDeDauw "JeroenDeDauw (1 commits)")

---

Tags

laravelvalidationpasswordlaravel 5laravel5password strength

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/xunextw-password-strength/health.svg)

```
[![Health](https://phpackages.com/badges/xunextw-password-strength/health.svg)](https://phpackages.com/packages/xunextw-password-strength)
```

###  Alternatives

[schuppo/password-strength

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

1432.7M1](/packages/schuppo-password-strength)[proengsoft/laravel-jsvalidation

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

1.1k2.3M49](/packages/proengsoft-laravel-jsvalidation)[laravel-validation-rules/credit-card

Validate credit card number, expiration date, cvc

2412.2M5](/packages/laravel-validation-rules-credit-card)[axlon/laravel-postal-code-validation

Worldwide postal code validation for Laravel and Lumen

3853.3M1](/packages/axlon-laravel-postal-code-validation)[illuminatech/validation-composite

Allows uniting several validation rules into a single one for easy re-usage

184485.5k](/packages/illuminatech-validation-composite)[bllim/laravalid

This package makes validation rules defined in laravel work client-side by converting to html/js plugins such as jquery validation. It also allows to use laravel validation messages so you can show same messages for both sides.

5915.2k](/packages/bllim-laravalid)

PHPackages © 2026

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