d3th / yii2-zxcvbn-validator
A realistic password strength estimator for Yii2
Installs: 501
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- bjeavons/zxcvbn-php: *
- yiisoft/yii2: ^2.0
Requires (Dev)
- phpunit/phpunit: ~4.0
This package is not auto-updated.
Last update: 2018-04-28 13:24:49 UTC
README
ZxcvbnPasswordValidator is a password strength estimator for Yii Framework. Based on the ZxcvbnPhp library from bjeavons.
Installation
The preferred way to install this extension is through composer.
Either run
composer require d3th/yii2-zxcvbn-validator
or add
"d3th/yii2-zxcvbn-validator": "*"
to the require section of your composer.json.
Usage
public function rules() { return [ ['password', 'required'], ['password', 'string', 'min' => 8], ['password', ZxcvbnPasswordValidator::className(), 'minScore' => 3] ]; }
Acknowledgements
- Thanks to @lowe for the original Javascript Zxcvbn.
- Thanks to @bjeavons for ZxcvbnPhp library.