Polish forced password change flow
This commit is contained in:
@@ -19,7 +19,19 @@ class PasswordUpdateRequest extends FormRequest
|
||||
{
|
||||
return [
|
||||
'current_password' => $this->currentPasswordRules(),
|
||||
'password' => $this->passwordRules(),
|
||||
'password' => [...$this->passwordRules(), 'different:current_password'],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the custom validation messages for the request.
|
||||
*
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public function messages(): array
|
||||
{
|
||||
return [
|
||||
'password.different' => 'The new password must be different from your current password.',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user