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

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

mdarse/password-strength-validator
==================================

Password strength validator for Symfony framework. Based on Dropbox's zxcvbn project.

v1.0.0(9y ago)67.5k3[2 PRs](https://github.com/mdarse/password-strength-validator/pulls)MPL-2.0PHP

Since Jul 28Pushed 4y ago1 watchersCompare

[ Source](https://github.com/mdarse/password-strength-validator)[ Packagist](https://packagist.org/packages/mdarse/password-strength-validator)[ RSS](/packages/mdarse-password-strength-validator/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (3)Versions (2)Used By (0)

Password strength validator
===========================

[](#password-strength-validator)

Password strength constraint for Symfony validator component. Based on the [zxcvbn project](https://blogs.dropbox.com/tech/2012/04/zxcvbn-realistic-password-strength-estimation/)from Dropbox and @lowe, this is using [zxcvbn-php](https://github.com/bjeavons/zxcvbn-php)under the hood for 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.

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

[](#installation)

The library can be installed with [Composer](http://getcomposer.org) by adding it as a dependency to your composer.json file.

```
$ composer require "mdarse/password-strength-validator"

```

Usage
-----

[](#usage)

```
use Darse\PasswordStrengthValidator\Constraint\PasswordStrength;

class User
{
    /**
     * @PasswordStrength(min_score=3, message="Custom message for weak password error")
     */
    private $password;
}
```

You may simply use the simpler `@PasswordStrength(3)` form for a minimum password score of `3`, if you don't need a custom message.
More information on validation with Symfony validator can be found in [the documentation](http://symfony.com/doc/current/book/validation.html).

Score
-----

[](#score)

The score is an integer from 0-4 (you can mentally represent it as a strength bar)

- `0` too guessable: risky password. (guesses &lt; 10^3)
- `1` very guessable: protection from throttled online attacks. (guesses &lt; 10^6)
- `2` somewhat guessable: protection from unthrottled online attacks. (guesses &lt; 10^8)
- `3` safely unguessable: moderate protection from offline slow-hash scenario. (guesses &lt; 10^10)
- `4` very unguessable: strong protection from offline slow-hash scenario. (guesses &gt;= 10^10)

License
-------

[](#license)

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at .
See the [complete license](LICENSE).

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity63

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

Unknown

Total

1

Last Release

3624d ago

### Community

Maintainers

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

---

Top Contributors

[![mdarse](https://avatars.githubusercontent.com/u/484720?v=4)](https://github.com/mdarse "mdarse (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.5M378](/packages/easycorp-easyadmin-bundle)[api-platform/core

Build a fully-featured hypermedia or GraphQL API in minutes!

2.6k50.1M314](/packages/api-platform-core)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.1k16.8k](/packages/prestashop-prestashop)[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1175.2k](/packages/rcsofttech-audit-trail-bundle)[web-auth/webauthn-framework

FIDO2/Webauthn library for PHP and Symfony Bundle.

51390.8k3](/packages/web-auth-webauthn-framework)[api-platform/validator

API Platform validator component

274.1M23](/packages/api-platform-validator)

PHPackages © 2026

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