lightmaker / complexify-bundle
一个简单的Symfony2扩展包,用于Michael Crumley对Dan Palmer的jquery.complexify.js的PHP版本
1.1
2016-04-29 23:05 UTC
Requires
- php: >=5.4
- mcrumley/php-complexify: 0.4
- symfony/validator: >=2.3.20
Requires (Dev)
- phpunit/phpunit: ~4.4
This package is not auto-updated.
Last update: 2024-09-28 16:40:00 UTC
README
A Symfony2 bundle for Michael Crumley's PHP port of Dan Palmer's jquery.complexify.js
安装
composer require lightmaker/complexify-bundle
更新你的Kernel
# AppKernel.php public function registerBundles() { $bundles = array( new Lightmaker\ComplexifyBundle\LightmakerComplexifyBundle() ); }
用法
您可以使用以下选项使用 Lightmaker\ComplexifyBundle\Validator\Constraints\Complexify
约束。
- message: 验证信息(默认:'密码必须复杂。')
- minimumChars: 可接受的最小密码长度(默认:8)
- strengthScaleFactor: 调整所需密码强度 - 数字越高,密码越复杂(默认:1)
- bannedPasswords: 被禁止的密码数组(默认:空数组)
- banMode: strict == 不允许禁止密码的子字符串,loose == 只禁止完全匹配(默认:strict)
- encoding: (默认:'UTF-8')