PHPackages                             locastic/zxcvbn-password-validator - 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. locastic/zxcvbn-password-validator

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

locastic/zxcvbn-password-validator
==================================

Realistic Symfony password strength validator based on Zxcvbn PHP

v1.3.1(7y ago)11.5k3MITPHPPHP ^7.0

Since Jul 18Pushed 5y ago4 watchersCompare

[ Source](https://github.com/Locastic/ZxcvbnPasswordValidator)[ Packagist](https://packagist.org/packages/locastic/zxcvbn-password-validator)[ RSS](/packages/locastic-zxcvbn-password-validator/feed)WikiDiscussions master Synced yesterday

READMEChangelog (5)Dependencies (9)Versions (6)Used By (0)

ZxcvbnPasswordValidator
=======================

[](#zxcvbnpasswordvalidator)

Realistic Symfony password strength validator based on Dropbox's zxcvbn project.

 [ ![](https://camo.githubusercontent.com/30945050decf6c82e385d4ead3694d196f243cbe2b73433d5aed4ccad65b3391/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6c6f6361737469632f7a786376626e2d70617373776f72642d76616c696461746f722e737667) ](https://packagist.org/packages/locastic/zxcvbn-password-validator "License") [ ![](https://camo.githubusercontent.com/e91cde8ea5b3a18230d1674e29bb674cc25425796815d9749581c5e889910381/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f4c6f6361737469632f7a786376626e2d70617373776f72642d76616c696461746f722e737667) ](https://packagist.org/packages/locastic/zxcvbn-password-validator "Version") [ ![](https://camo.githubusercontent.com/492af997c86bf8f36e52fd785aab50db4757d93fa5e2d2990318f718f86742a5/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f4c6f6361737469632f5a786376626e50617373776f726456616c696461746f722f6d61737465722e737667) ](https://travis-ci.org/Locastic/ZxcvbnPasswordValidator "Build status") [ ![](https://camo.githubusercontent.com/e9ad53efe7f9cadb75b2ae0418919d2291ae5ccb66597cdefc9be0d6edacecfb/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f4c6f6361737469632f5a786376626e50617373776f726456616c696461746f722e737667) ](https://scrutinizer-ci.com/g/Locastic/ZxcvbnPasswordValidator/ "Scrutinizer") [ ![](https://camo.githubusercontent.com/ee5d1e6811a26b12828f657bb95cea78a80d3acc12112dc4ca696f19dd85cbc1/68747470733a2f2f706f7365722e707567782e6f72672f6c6f6361737469632f7a786376626e2d70617373776f72642d76616c696461746f722f646f776e6c6f616473) ](https://packagist.org/packages/locastic/zxcvbn-password-validator "Total Downloads")
========================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#--------------------------------------------------------------------------------)

Overview
--------

[](#overview)

Zxcvbn-PHP is a password strength estimator using pattern matching and minimum entropy calculation. Zxcvbn-PHP is based on the Javascript zxcvbn project from Dropbox and @lowe. "zxcvbn" is bad password, just like "qwerty" and "123456".

More info [here](https://blogs.dropbox.com/tech/2012/04/zxcvbn-realistic-password-strength-estimation/).

> zxcvbn attempts to give sound password advice through pattern matching and conservative entropy calculations. It finds 10k common passwords, common American names and surnames, common English words, and common patterns like dates, repeats (aaa), sequences (abcd), and QWERTY patterns.

This validator is based on library: [Zxcvbn-PHP](https://github.com/bjeavons/zxcvbn-php)

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

[](#installation)

```
composer require locastic/zxcvbn-password-validator

```

Options
-------

[](#options)

You can use the `Locastic\Component\ZxcvbnPasswordValidator\Validator\Constraints\ZxcvbnPasswordValidator`constraint with the following options.

OptionTypeDescriptionmessage`string`The validation message (default: `password_too_weak`)minEntropy`float`Desired minimal entropy value (password strengthAnnotations
-----------

[](#annotations)

If you are using annotations for validation, include the constraints namespace:

```
use Locastic\Component\ZxcvbnPasswordValidator\Validator\Constraints as LocasticPassword;
```

and then add the ZxcvbnPasswordValidator constraint to the relevant field:

```
/**
 * @LocasticPassword\ZxcvbnPasswordValidator(minEntropy=50)
 */
protected $password;
```

YAML
----

[](#yaml)

```
App\Entity\User:
    properties:
        password:
            - Locastic\Component\ZxcvbnPasswordValidator\Validator\Constraints\ZxcvbnPasswordValidator:
                 minEntropy: 50
```

Support
-------

[](#support)

Need help at your project? Write us an email on

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity61

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

Total

5

Last Release

2855d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/13758a6abd53618188475ebd3bab831a8669a3ebe7f9880a12a2ec1ba80b9643?d=identicon)[antonioperic](/maintainers/antonioperic)

---

Top Contributors

[![antonioperic](https://avatars.githubusercontent.com/u/2453151?v=4)](https://github.com/antonioperic "antonioperic (17 commits)")

---

Tags

phpsymfonyvalidatorpassworddropboxzxcvb

### Embed Badge

![Health badge](/badges/locastic-zxcvbn-password-validator/health.svg)

```
[![Health](https://phpackages.com/badges/locastic-zxcvbn-password-validator/health.svg)](https://phpackages.com/packages/locastic-zxcvbn-password-validator)
```

###  Alternatives

[rollerworks/password-strength-validator

Password-strength validator for Symfony

1455.7M6](/packages/rollerworks-password-strength-validator)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[rollerworks/password-strength-bundle

Password-strength validator bundle for Symfony

1433.7M6](/packages/rollerworks-password-strength-bundle)

PHPackages © 2026

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