laminas/laminas-validator
Validation component for PHP and Laminas applications. Provides a wide range of ready-to-use validators (strings, numbers, dates, files, and more), consistent error messages, and an extensible API to create custom validators and input filtering rules.
Laminas\Validator\File\IsCompressed checks if a file is a compressed archive,
such as zip or gzip. This validator is based on the
MimeType validator, and supports the same methods and options.
The default list of compressed file MIME types can be found in the source code.
Please refer to the MimeType validator for options and public methods.
$validator = new \Laminas\Validator\File\IsCompressed();
if ($validator->isValid('./myfile.zip')) {
// file is valid
}
How can I help you explore Laravel packages today?