PHPackages                             jblab/password-validator-bundle - 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. jblab/password-validator-bundle

ActiveSymfony-bundle[Validation &amp; Sanitization](/categories/validation)

jblab/password-validator-bundle
===============================

Validates a password based on certain criteria.

2.1.0(4mo ago)21361Apache-2.0PHPPHP ^8.1CI passing

Since Nov 3Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/jblab/password-validator-bundle)[ Packagist](https://packagist.org/packages/jblab/password-validator-bundle)[ RSS](/packages/jblab-password-validator-bundle/feed)WikiDiscussions main Synced 5d ago

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

Password Validator Bundle [![jblab logo](https://camo.githubusercontent.com/7b3da2d28d2665a07f6669eb9dd936e01fea7180d7dc1a60edffbbd866b44c52/68747470733a2f2f6173736574732e6a626c61622e696e666f2f323032342f30332f31372f6a626c61622d6c6f676f2d776974682d746578742e323664613233363732666334346331373037386463386365326666383439356464623139303136332e77656270)](https://camo.githubusercontent.com/7b3da2d28d2665a07f6669eb9dd936e01fea7180d7dc1a60edffbbd866b44c52/68747470733a2f2f6173736574732e6a626c61622e696e666f2f323032342f30332f31372f6a626c61622d6c6f676f2d776974682d746578742e323664613233363732666334346331373037386463386365326666383439356464623139303136332e77656270)
=================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#password-validator-bundle-)

[![License](https://camo.githubusercontent.com/753b222389d983713c05b305cd5ba4a064fcbe8dc060e90da88b74ee0401340a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d417061636865253230322e302d626c75652e7376673f7374796c653d666c61742d737175617265)](LICENSE) [![Latest Release](https://camo.githubusercontent.com/35b6221e0214001e4e373ea7c6b7d4b0a93369f39d9bf71f216a3c69622a1c37/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6a626c61622f70617373776f72642d76616c696461746f722d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://github.com/jblab/password-validator-bundle/releases/latest) [![GitHub Actions Workflow Status](https://camo.githubusercontent.com/ff3b9077470ca284653e213b550e930f2c930ab0651ea3fca17abaa75685ae00/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6a626c61622f70617373776f72642d76616c696461746f722d62756e646c652f63692e79616d6c3f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/ff3b9077470ca284653e213b550e930f2c930ab0651ea3fca17abaa75685ae00/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6a626c61622f70617373776f72642d76616c696461746f722d62756e646c652f63692e79616d6c3f7374796c653d666c61742d737175617265)

**Password Validator Bundle** is a Symfony package to help you validate passwords against customizable criteria with ease.

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

[](#installation)

### Applications that use Symfony Flex

[](#applications-that-use-symfony-flex)

Open a command console, enter your project directory and execute:

```
composer require jblab/password-validator-bundle
```

### Applications that don't use Symfony Flex

[](#applications-that-dont-use-symfony-flex)

#### Step 1: Download the Bundle

[](#step-1-download-the-bundle)

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:

```
composer require jblab/password-validator-bundle
```

#### Step 2: Enable the Bundle

[](#step-2-enable-the-bundle)

Then, enable the bundle by adding it to the list of registered bundles in the `config/bundles.php` file of your project:

```
// config/bundles.php

return [
    // ...
    Jblab\PasswordValidatorBundle\JblabPasswordValidatorBundle::class => ['all' => true],
];
```

Usage
-----

[](#usage)

This bundle provides a single service for validating passwords, which you can autowire by using the `PasswordValidatorInterface` type-hint:

```
// src/Controller/SomeController.php
use Jblab\PasswordValidatorBundle\PasswordValidatorInterface;
// ...
class SomeController
{
    public function __construct(private readonly PasswordValidatorInterface $passwordValidator)
    {
    }

    public function index()
    {
        $password = 'StrongPass1!';
        $isValid = $this->passwordValidator->validate($password);

        if (!$isValid) {
            // Handle invalid password, e.g., return error response
        }
        // Continue with your logic for valid passwords
    }
}
```

You can also access this service directly using the id `jblab_password_validator.password_validator`.

Configuration
-------------

[](#configuration)

To customize password validation criteria, add the configuration file `config/packages/jblab_password_validator.yaml`with the following options (default values shown):

```
# config/packages/jblab_password_validator.yaml
jblab_password_validator:

  # Minimum password length.
  minimum_length: 8

  # Maximum password length.
  maximum_length: 64

  # Whether or not to require a special character.
  require_special_character: true

  # Whether or not to require a uppercase letter.
  require_uppercase: true

  # Whether or not to require a lowercase letter.
  require_lowercase: true

  # Whether or not to require a number.
  require_number: true

  # String containing all valid special characters
  special_character_set: '!@#$%^&*()_+-=[]{}|'''

  # String containing all invalid characters
  excluded_character_set: null
```

Contributing
------------

[](#contributing)

We love contributions! If you have an idea for a feature, feel free to open an issue or, better yet, submit a pull request. We welcome participation, whether you're submitting code, reporting bugs, or asking questions. Check out the [contribution guidelines](CONTRIBUTING.md) to get started.

License
-------

[](#license)

This bundle is released under the [Apache 2.0 License](LICENSE). Feel free to use it in your projects.

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance79

Regular maintenance activity

Popularity14

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 91.5% 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 ~134 days

Recently: every ~86 days

Total

7

Last Release

121d ago

Major Versions

1.x-dev → 2.0.02025-02-04

PHP version history (2 changes)1.1.2PHP ^7.1 || ^8.0

2.0.0PHP ^8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/14863969?v=4)[jbonnier](/maintainers/jbonnier)[@jbonnier](https://github.com/jbonnier)

---

Top Contributors

[![jbonnier](https://avatars.githubusercontent.com/u/14863969?v=4)](https://github.com/jbonnier "jbonnier (54 commits)")[![semantic-release-bot](https://avatars.githubusercontent.com/u/32174276?v=4)](https://github.com/semantic-release-bot "semantic-release-bot (5 commits)")

### Embed Badge

![Health badge](/badges/jblab-password-validator-bundle/health.svg)

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

###  Alternatives

[symfony/security-bundle

Provides a tight integration of the Security component into the Symfony full-stack framework

2.5k172.9M1.8k](/packages/symfony-security-bundle)[sonata-project/entity-audit-bundle

Audit for Doctrine Entities

644989.8k1](/packages/sonata-project-entity-audit-bundle)[cuyz/valinor-bundle

Symfony integration of `cuyz/valinor` — a library that helps to map any input into a strongly-typed value object structure.

51215.0k2](/packages/cuyz-valinor-bundle)[digitalrevolution/symfony-request-validation

Automatic request validation for symfony

1296.0k](/packages/digitalrevolution-symfony-request-validation)

PHPackages © 2026

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