validationFactory = app(Factory::class); } public function validateArray(array $data, array $rules): array { return $this->validationFactory->make($data, $rules)->errors()->messages(); } public function zipFileExists(string $name): bool { return $this->zip->statName("files/{$name}") !== false; } public function fileReferenceRule(): ZipFileReferenceRule { return new ZipFileReferenceRule($this); } }