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

Md5

Zend\Validator\File\Md5 allows you to validate if a given file's hashed contents matches the supplied md5 hash(es). It is subclassed from the Hash validator to provide a validator that supports only the MD5 algorithm.

Requires the hash extension

This validator requires the PHP Hash extension PHP with the md5 algorithm.

Supported Options

The following set of options are supported:

  • hash: String hash or array of hashes against which to validate.

Basic Usage

use Zend\Validator\File\Md5;

// Does file have the given hash?
$validator = new Md5('3b3652f336522365223');

// Or, check file against multiple hashes
$validator = new Md5([
    '3b3652f336522365223', 'eb3365f3365ddc65365'
]);

// Or use options notation:
$validator = new Md5(['hash' => [
    '3b3652f336522365223', 'eb3365f3365ddc65365'
]]);


// Perform validation with file path
if ($validator->isValid('./myfile.txt')) {
    // file is valid
}

Public Methods

getMd5

getMd5() : array

Returns an array of MD5 hashes against which to validate.

addMd5

addMd5(string|array $options) : void

Add one or more hashes to validate against.

setMd5

setMd5(string|array $options) : void

Overwrite any previously set hashes with those specified.

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