diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index e184afa7..f9973769 100644 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -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', + ]); + } }