lightmaker / complexify-bundle
A simple Symfony2 bundle for Michael Crumley's PHP port of Dan Palmer's jquery.complexify.js
Installs: 21 519
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 7
Forks: 1
Open Issues: 2
Type:symfony-bundle
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: 2025-01-04 18:25:52 UTC
README
A Symfony2 bundle for Michael Crumley's PHP port of Dan Palmer's jquery.complexify.js
Installation
composer require lightmaker/complexify-bundle
Update your Kernel
# AppKernel.php public function registerBundles() { $bundles = array( new Lightmaker\ComplexifyBundle\LightmakerComplexifyBundle() ); }
Usage
You can use the Lightmaker\ComplexifyBundle\Validator\Constraints\Complexify
constraint with the following options.
- message: The validation message (default: 'Password must be complex.')
- minimumChars: The minimum acceptable password length (default: 8)
- strengthScaleFactor: Scale the required password strength - higher numbers require a more complex password (default: 1)
- bannedPasswords: An array of banned passwords (Default: empty array)
- banMode: strict == don't allow substrings of banned passwords, loose == only ban exact matches (default: strict)
- encoding: (default: 'UTF-8')