Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Zend Validator Laravel Package

zendframework/zend-validator

Powerful validation library from Zend Framework for PHP apps. Provides a wide range of reusable validators, input filtering, and custom rule support with clear error messages. Integrates easily into forms and domain validation workflows.

View on GitHub
Deep Wiki
Context7

Upload

Zend\Validator\File\Upload validates that a file upload operation was successful.

Supported Options

Zend\Validator\File\Upload supports the following options:

  • files: array of file uploads. This is generally the $_FILES array, but should be normalized per the details in PSR-7 (which is also how the zend-http Request normalizes the array).

Basic Usage

use Zend\Validator\File\Upload;

// Using zend-http's request:
$validator = new Upload($request->getFiles());

// Or using options notation:
$validator = new Upload(['files' => $request->getFiles()]);

// Validate:
if ($validator->isValid('foo')) {
    // "foo" file upload was successful
}

PSR-7 Support

  • Since 2.11.0

Starting in 2.11.0, you can also pass an array of PSR-7 UploadedFileInterface instances to the constructor, the setFiles() method, or the isValid() method (in the latter case, you are validating that all uploaded files were valid).

use Zend\Validator\File\Upload;

// [@var](https://github.com/var) Psr\Http\Message\ServerRequestInterface $request
$validator = new Upload($request->getUploadedFiles());

// Or using options notation:
$validator = new Upload([
    'files' => $request->getUploadedFiles(),
]);

// Validate:
if ($validator->isValid('foo')) {
    // "foo" file upload was successful
}
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport