PHPackages                             nstcactus/yii2-pwned-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. nstcactus/yii2-pwned-validator

ActiveYii2-extension[Validation &amp; Sanitization](/categories/validation)

nstcactus/yii2-pwned-validator
==============================

A Yii2 password validator against the HIBP pwned passwords API

1.0.0(6y ago)05MITPHP

Since Jun 23Pushed 6y agoCompare

[ Source](https://github.com/nstCactus/yii2-pwned-validator)[ Packagist](https://packagist.org/packages/nstcactus/yii2-pwned-validator)[ RSS](/packages/nstcactus-yii2-pwned-validator/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Yii2 Pwned validator
====================

[](#yii2-pwned-validator)

A Yii2 password validator against the [Pwned passwords database](https://haveibeenpwned.com/Passwords).

> Pwned Passwords are more than half a billion real world passwords previously exposed in data breaches. This exposure makes them unsuitable for ongoing use as they're at much greater risk of being used to take over other accounts.

Requirements
------------

[](#requirements)

- Yii framework 2
- PHP `mbstring` (multibyte string) extension (required)

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

[](#installation)

The preferred way to install this extension is through [Composer](https://getcomposer.org).

To install, either run

```
$ composer require nstcactus/yii2-pwned-validator

```

or add

```
"nstcactus/yii2-pwned-validator": "*"

```

to the `require` section of your `composer.json` file.

Usage
-----

[](#usage)

Model class example:

```
