<?php

namespace App\Http\Requests\INSURANCE;

use Illuminate\Foundation\Http\FormRequest;

class CommissionDefaultRequest extends FormRequest
{
    public function authorize()
    {
        // Modify authorization logic if needed.
        return true;
    }

    public function rules()
    {
        return [
            // commission_defaults must be an array.
            'commission_defaults'   => 'required|array',
            // Each commission default should be numeric (or null) and between 0 and 100.
            'commission_defaults.*' => 'nullable|numeric|min:0|max:100',
        ];
    }
}
