Open LocalHeroPro opened 3 years ago
Suggest to use #505 as that will work with unsupported rules
Use new password rules as callback like:
return [
'password' => [
'required',
function ($attribute, $value, $fail) {
$rule = new Password(10);
$rule->setData(['password' => $value]);
$rule->uncompromised()->letters()->numbers()->mixedCase();
$passes = $rule->passes('password', $value);
$messages = $rule->message();
if (!$passes) {
$fail(__($messages[0]));
}
},
],
];
Subject of the issue
Want to use: https://laravel.com/docs/8.x/validation#validating-passwords.
Your environment
Steps to reproduce
Use:
Expected behaviour
Want to use: https://laravel.com/docs/8.x/validation#validating-passwords.
Actual behaviour
Frontend validator don't recognize that rule.