Initial commit: Lash Vanshy - Complete project with admin panel, gallery, products, and contact
This commit is contained in:
31
app/Http/Requests/LoginRequest.php
Executable file
31
app/Http/Requests/LoginRequest.php
Executable file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class LoginRequest extends FormRequest
|
||||
{
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'email' => ['required', 'string', 'email', 'max:255'],
|
||||
'password' => ['required', 'string', 'min:1'],
|
||||
];
|
||||
}
|
||||
|
||||
public function messages(): array
|
||||
{
|
||||
return [
|
||||
'email.required' => 'El email es obligatorio.',
|
||||
'email.email' => 'El email debe ser una dirección válida.',
|
||||
'email.max' => 'El email no puede exceder 255 caracteres.',
|
||||
'password.required' => 'La contraseña es obligatoria.',
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user