<?php

namespace Daniv04\HaciendaPackage\Http\Requests;



use Daniv04\HaciendaPackage\Services\Validators\ElectronicPaymentReceiptValidatorService;


class ElectronicPaymentReceiptRequest extends BaseReceiptRequest
{

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


    //================Validation functions====================//

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

        return $validator;
    }
}
