PHPackages                             nibynool/password-policy - 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. nibynool/password-policy

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

nibynool/password-policy
========================

A set of password policies to enable easy validation of a range of password requirements

v0.9.1(6y ago)481MITPHPPHP ^5.6 || ^7.0 || ^7.2 || ^7.4CI failing

Since Apr 19Pushed 6y ago1 watchersCompare

[ Source](https://github.com/nibynool/php-passwd-policy)[ Packagist](https://packagist.org/packages/nibynool/password-policy)[ Docs](https://software.alphageek.com.au/php/passwd-policy)[ RSS](/packages/nibynool-password-policy/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (2)Dependencies (6)Versions (3)Used By (0)

PHP Password Policy
===================

[](#php-password-policy)

This library is designed to implement variable password policies that are commonly found in B2B SaaS providers.

SaaS providers that operate in a B2B environment often have different password policy requirements for different customers. This library contains a set of password policies that can be chained and configured independently. Functionality has also been added to allow the merging of multiple policies which may be used when a single user can be associated with multiple customers.

Compatibility &amp; Dependencies
--------------------------------

[](#compatibility--dependencies)

This library has been written to be compatible with PHP5.6 and greater. Each release is tested against PHP 5.6, 7.0, 7.2 and 7.4. As additional versions of PHP are released they may be added to the test suite. At a future date support for PHP 5.6 will be dropped.

The following PHP dependencies exist and are enforced in `composer.json`:

- `ext-json` - to enable interpretation of JSOn configuration
- `ext-pspell` - to enable dictionary word checking

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

[](#installation)

It is recommended this library be installed through `composer`.

```
composer install nibynool/password-policy
```

Support for PHP 5.6 will likely be dropped in version 2.0.0 of this library. Please ensure your version constraints in your `composer.json` file allow for this if you are using an old version of PHP.

Usage
-----

[](#usage)

### Manual Implementation

[](#manual-implementation)

The quickest way to implement this library is to configure a password policy set and then validate a password.

```
