<?php

namespace App\Http\Requests\Auth;

use Illuminate\Foundation\Http\FormRequest;

class StudentLoginRequest extends FormRequest
{
    public function authorize(): bool
    {
        return true;
    }

    protected function prepareForValidation(): void
    {
        $remember = $this->boolean('remember');

        $this->merge([
            'remember' => $remember,
        ]);
    }

    public function rules(): array
    {
        return [
            'email' => ['required', 'string', 'max:190'],
            'password' => ['required', 'string', 'max:100'],
            'remember' => ['nullable', 'boolean'],
        ];
    }
}
