<?php

namespace Modules\Payroll\Http\Requests\CpfAccounts;

use Illuminate\Foundation\Http\FormRequest;
use Modules\Core\Traits\FailedValidation;

class UpdateCpfAccountRequest extends FormRequest
{
    use FailedValidation;

    /**
     * Determine if the user is authorized to make this request.
     */
    public function authorize(): bool
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     */

    public function rules(): array
    {
        return [
            'account_no'            => ['nullable', 'string', 'max:50'],
            'employee_percentage'   => ['required', 'numeric', 'min:0', 'max:100'],
            'employer_percentage'   => ['required', 'numeric', 'min:0', 'max:100'],
        ];
    }
}
