<?php

namespace Daniv04\HaciendaPackage\Http\Requests;

use Daniv04\HaciendaPackage\Services\Validators\ElectronicTicketValidatorService;





class ElectronicTicketRequest extends BaseReceiptRequest 
{


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

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

        return $validator;
    }
}
