Add validation for email
This commit is contained in:
parent
5eee14e0de
commit
206fbb193b
|
@ -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',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue