TextInput::make('password')->rules([
fn (): Closure => function (string $attribute, $value, Closure $fail) {
if (Hash::check($value, $this->user->password)) {
$fail('The new password must be different from your current password.');
}
},
])
TextInput::make('password')->rules([
fn (): Closure => function (string $attribute, $value, Closure $fail) {
if (Hash::check($value, $this->user->password)) {
$fail('The new password must be different from your current password.');
}
},
])