Skip to content

Commit 7092f7d

Browse files
committed
fix: translate field name in validate error for LoginController
1 parent a941c4d commit 7092f7d

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

src/Controllers/LoginController.php

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,18 @@ public function loginAction(): RedirectResponse
7070
protected function getValidationRules(): array
7171
{
7272
return setting('Validation.login') ?? [
73-
//'username' => config('AuthSession')->usernameValidationRules,
74-
'email' => config('AuthSession')->emailValidationRules,
75-
'password' => 'required',
73+
// 'username' => [
74+
// 'label' => 'Auth.username',
75+
// 'rules' => config('AuthSession')->usernameValidationRules,
76+
// ],
77+
'email' => [
78+
'label' => 'Auth.email',
79+
'rules' => config('AuthSession')->emailValidationRules,
80+
],
81+
'password' => [
82+
'label' => 'Auth.password',
83+
'rules' => 'required',
84+
],
7685
];
7786
}
7887

0 commit comments

Comments
 (0)