<?php

declare(strict_types=1);

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

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

/**
 * Class TestUpdateRequest
 *
 * @package Seka\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),
            ],
        ];
    }
}
