<?php

namespace App\Http\Requests\Semesters;

use App\Http\Requests\ApiFormRequest;

class SchoolYearRangeRequest extends ApiFormRequest
{
    public function authorize(): bool
    {
        return true;
    }

    public function validationData(): array
    {
        return request()->all();
    }

    public function rules(): array
    {
        return [
            'school_year' => ['required', 'string', 'regex:/^\\d{4}-\\d{4}$/'],
        ];
    }
}
