<?php

namespace Daniv04\HaciendaPackage\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Http\Exceptions\HttpResponseException;
use Daniv04\HaciendaPackage\Services\Validators\ElectronicExportInvoiceValidatorService;




class ElectronicExportInvoiceRequest extends BaseReceiptRequest
{


    public function rules(): array
    {
        return ElectronicExportInvoiceValidatorService::rules($this->all());
    }

    public function withValidator($validator)
    {
        $validator->after(function ($validator) {
            ElectronicExportInvoiceValidatorService::after($validator, $this->all());
        });

        return $validator;
    }
}
