<?php

declare(strict_types=1);

namespace Seka\Portal\Modul\Vzdelavanie\Http\Requests\Sprava\Testovanie\Test;

use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;
use Seka\Portal\Modul\Vzdelavanie\Enums\ModelStatusEnum;

/**
 * Class TestUpdateRequest
 *
 * @package Seka\Portal\Modul\Vzdelavanie\Http\Requests\Sprava\Testovanie\Test
 */
final class TestUpdateRequest extends FormRequest
{
    /**
     * @return array
     */
    public function rules(): array
    {
        return [
            'nazov' => 'required|min:1|max:255',
            'popis' => 'max:1024',
            'pocet_otazok' => 'required|integer|min:1|max:100',
            'stav' => [
                'required',
                Rule::enum(ModelStatusEnum::class),
            ],
        ];
    }
}
