<?php

namespace App\Http\Requests\V1\Dashboard;

use Illuminate\Foundation\Http\FormRequest;

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

    public function rules(): array
    {
        return [
            'limit' => ['nullable', 'integer', 'min:1', 'max:50'],
        ];
    }

    public function messages(): array
    {
        return [
            'limit.min' => __('error.validation.min', ['min' => 1]),
            'limit.max' => __('error.validation.max', ['max' => 50]),
        ];
    }
}
