orkhanahmadov/laravel-zip-validator
Laravel validation rules for ZIP archives. Verify uploads are valid ZIPs, restrict allowed or denied file extensions, cap file counts and uncompressed sizes, and inspect archive contents with simple, chainable rules—no manual extraction required.
ZipArchive inspection code and the edge cases that come with it (corrupt archives, zip bombs, unexpected file types).manifest.json and at least one .csv in /data" as validation rules attached to a form request, keeping archive policy declarative and testable alongside the rest of your validation layer.*.csv, data/*.json) let you accept archives with variable or timestamped file names — a real requirement for customer-supplied exports from third-party systems (ERP, e-commerce, accounting tools) that control the naming. This can unblock a "accept uploads from external systems" roadmap item that would otherwise have required custom code.Adopt when:
Look elsewhere or stay in-house when:
ZipArchive calls may be simpler than adding a dependency.For executives: We needed to accept ZIP archives from customers and partners and reject bad ones reliably and safely — historically a place where custom code and security bugs accumulate. This package lets us express archive requirements as standard validation rules, and release 1.11.0 adds wildcard file matching, which removes a blocker on accepting uploads from third-party systems whose file naming we do not control. It is a small, focused, low-cost dependency with a clear security benefit.
For engineering: Adopt orkhanahmadov/laravel-zip-validator 1.11.x for archive validation at the request layer. Rules are declarative and testable; wildcard patterns let us stop constraining partners to exact file names. Constraint: 1.11.0 drops Laravel 8 — minimum is Laravel 9. Any service still on Laravel 8 must stay on 1.10.x and be flagged for upgrade; do not attempt to install 1.11.x there. Scope is validation only — extraction, parsing, and scanning remain our responsibility. Confirm upload size ceilings against the package's archive inspection cost before rolling out to high-volume endpoints.
How can I help you explore Laravel packages today?