mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-22 04:53:17 +00:00
Update LoginController, fix captcha validation error message
This commit is contained in:
parent
74423b52ca
commit
0325e17115
1 changed files with 3 additions and 2 deletions
|
@ -71,6 +71,7 @@ class LoginController extends Controller
|
|||
$this->username() => 'required|email',
|
||||
'password' => 'required|string|min:6',
|
||||
];
|
||||
$messages = [];
|
||||
|
||||
if(
|
||||
config('captcha.enabled') ||
|
||||
|
@ -82,9 +83,9 @@ class LoginController extends Controller
|
|||
)
|
||||
) {
|
||||
$rules['h-captcha-response'] = 'required|filled|captcha|min:5';
|
||||
$messages['h-captcha-response.required'] = 'The captcha must be filled';
|
||||
}
|
||||
|
||||
$this->validate($request, $rules);
|
||||
$request->validate($rules, $messages);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue