Skip to content

Commit

Permalink
Merge pull request #8 from exophunk/master
Browse files Browse the repository at this point in the history
Fix password rule validation to work with never laravel versions
  • Loading branch information
mastani authored Apr 26, 2022
2 parents 115a31d + 39c2b27 commit 8d1edd0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Http/Requests/PasswordResetRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Mastani\NovaPasswordReset\Http\Requests;

use Illuminate\Validation\Rules\Password;
use Illuminate\Foundation\Http\FormRequest;

class PasswordResetRequest extends FormRequest {
Expand All @@ -22,7 +23,7 @@ public function authorize() {
public function rules() {
$minPasswordSize = config('nova-password-reset.min_password_size');
return [
'current_password' => 'required|password',
'current_password' => ['required', Password::default()],
'new_password' => "required|string|min:$minPasswordSize",
'confirm_new_password' => "required|string|min:$minPasswordSize|same:new_password"
];
Expand Down

0 comments on commit 8d1edd0

Please sign in to comment.