prokawsar / password-validator
Password validator for Laravel Framework
v1.0.0
2018-09-21 09:40 UTC
Requires
- php: >=5.5.0
This package is auto-updated.
Last update: 2025-03-05 19:38:23 UTC
README
PasswordValidator-Package
Currently in development
Installation
-
Run
composer require prokawsar/password-validator
-
Then run
php artisan vendor:publish
and selectProvider: prokawsar\PasswordValidator\PasswordValidatorServiceProvider
package
all rules will be published in the App/Rules folder.
To use this package
Use use App\Rules\{RuleName};
and add a rule in Validator::make calls as new RuleName
E.G.
<?php use App\Rules\Uppercase; return Validator::make($data, [ 'email' => 'required|string|email|max:255|unique:users', // 'password' => 'required|string|min:6|confirmed', 'password' => ['required', new Uppercase], ]);
Customization
You can set your own error
message
To change error message go to App\Rules\{RuleName}
and modify the return value in the message()
function.