Download the PHP package kanellov/password-strength-validator without Composer
On this page you can find all versions of the php package kanellov/password-strength-validator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download kanellov/password-strength-validator
More information about kanellov/password-strength-validator
Files in kanellov/password-strength-validator
Package password-strength-validator
Short Description A validator for checking password strength.cocom
License GNU GPLv3
Homepage https://github.com/kanellov/password-strength-validator
Informations about the package password-strength-validator
password-strength-validator
Validates if a password is strong enough by checking if it contains digits, symbols and letters in different casing.
master | develop |
---|---|
Installation
Install with composer:
Description
This package provides a validator for checking password strength. It can be customized to check for the following:
- Password contains at least one digit character
- Password contains at least one uppercase character
- Password contains at least one lowercase character
- Password contains at least one symbol character
- Password contains at least either one digit or symbol character
Also, when validating for symbols, you can exclude some of them from the validation (See [Excluding symbol characters](#Excluding symbol characters)).
Usage
Function
Zend Validator
In order to use this library as Zend Validator use must install zendframework/zend-validator
package.
Excluding symbol characters
When \Knlv\password_strength
function is called with KNLV_PWD_CONTAIN_SYM
or KNLV_PWD_CONTAIN_DGT_OR_SYM
flags it checks if password contains at least one of the symbol characters.
If don't want your password to contain some of these symbols, you can exclude them from the check by passing an extra argument
with the symbols you want to exclude. For example, the following shows how to exclude the @
and !
symbols from validation:
License
The GNU GENERAL PUBLIC LICENSE Version 3. Please see License File for more information.