Download the PHP package andrey-helldar/strong-password without Composer
On this page you can find all versions of the php package andrey-helldar/strong-password. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download andrey-helldar/strong-password
More information about andrey-helldar/strong-password
Files in andrey-helldar/strong-password
Package strong-password
Short Description This package provides a validator for ensuring strong passwords in Laravel applications
License MIT
Informations about the package strong-password
Laravel Strong Password
This package provides a validator for ensuring strong passwords in Laravel applications.
In Laravel, since version 8.39.0, you can use the standard password functionality (#36960).
Installation
To get the latest version of Laravel Strong Password, simply require the project using Composer:
Or manually update require
block of composer.json
and run composer update
.
If you don't use auto-discovery, add the ServiceProvider to the providers array in app/Providers/AppServiceProvider.php
:
You can also publish the config file to change implementations (ie. interface to specific class):
Usage
Rules
Now, a Validator
facade is extended by few rules:
psw_letters
- The field must include at least one letter.psw_case_diff
- The field must include both upper and lower case letters.psw_numbers
- The field must include at least one number.psw_symbols
- The field must include at least one symbol.psw_min_length
- The field must be at least ten characters.psw_strong
- The field must contain at least two characters in the lower and upper registers, at least one digit and a special character, and at least ten characters (include all rules:psw_letters
,psw_case_diff
,psw_numbers
,psw_symbols
andpsw_min_length
).
Validation in context
You can also perform condition checking inside your code by accessing the Password
facade:
For example, we will define the following rules in the config/strong-password.php file:
Thus, we will get the following results:
and
License
This package is licensed under the MIT License.
All versions of strong-password with dependencies
illuminate/contracts Version ^5.5|^6.0|^7.0|^8.0
illuminate/support Version ^5.5|^6.0|^7.0|^8.0
illuminate/validation Version ^5.5|^6.0|^7.0|^8.0
kwn/number-to-words Version ^1.12