Add validation for email

This commit is contained in:
Philipp Lang 2022-08-29 11:57:17 +02:00
parent 5eee14e0de
commit 206fbb193b
1 changed files with 12 additions and 0 deletions

View File

@ -5,6 +5,7 @@ namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use App\Providers\RouteServiceProvider;
use Illuminate\Foundation\Auth\AuthenticatesUsers;
use Illuminate\Http\Request;
use Inertia\Response;
class LoginController extends Controller
@ -43,4 +44,15 @@ class LoginController extends Controller
{
return \Inertia::render('VLogin');
}
/**
* Validate the user login request.
*/
protected function validateLogin(Request $request): void
{
$request->validate([
$this->username() => 'required|max:255|string|email',
'password' => 'required|string',
]);
}
}