mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 06:21:27 +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',
|
$this->username() => 'required|email',
|
||||||
'password' => 'required|string|min:6',
|
'password' => 'required|string|min:6',
|
||||||
];
|
];
|
||||||
|
$messages = [];
|
||||||
|
|
||||||
if(
|
if(
|
||||||
config('captcha.enabled') ||
|
config('captcha.enabled') ||
|
||||||
|
@ -82,9 +83,9 @@ class LoginController extends Controller
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
$rules['h-captcha-response'] = 'required|filled|captcha|min:5';
|
$rules['h-captcha-response'] = 'required|filled|captcha|min:5';
|
||||||
|
$messages['h-captcha-response.required'] = 'The captcha must be filled';
|
||||||
}
|
}
|
||||||
|
$request->validate($rules, $messages);
|
||||||
$this->validate($request, $rules);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue