Skip to content

Commit 1dde858

Browse files
Use the illuminate password rule and added deprecation message for Password rule (#511)
1 parent 9842275 commit 1dde858

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/Rules/Password.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
use Illuminate\Contracts\Validation\Rule;
66
use Illuminate\Support\Str;
77

8+
/**
9+
* @deprecated Use \Illuminate\Validation\Rules\Password instead.
10+
*/
811
class Password implements Rule
912
{
1013
/**

stubs/PasswordValidationRules.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace App\Actions\Fortify;
44

5-
use Laravel\Fortify\Rules\Password;
5+
use Illuminate\Validation\Rules\Password;
66

77
trait PasswordValidationRules
88
{
@@ -13,6 +13,6 @@ trait PasswordValidationRules
1313
*/
1414
protected function passwordRules(): array
1515
{
16-
return ['required', 'string', new Password, 'confirmed'];
16+
return ['required', 'string', Password::default(), 'confirmed'];
1717
}
1818
}

0 commit comments

Comments
 (0)