Download the PHP package yiisoft/hydrator-validator without Composer
On this page you can find all versions of the php package yiisoft/hydrator-validator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download yiisoft/hydrator-validator
More information about yiisoft/hydrator-validator
Files in yiisoft/hydrator-validator
Package hydrator-validator
Short Description Validating hydrator with raw data validation support
License BSD-3-Clause
Homepage https://www.yiiframework.com/
Informations about the package hydrator-validator
Yii Validating Hydrator
The package provides a hydrator that also does validation, including raw data. It's useful when input data comes from a user, and you need to validate it and then put it into DTOs.
Requirements
- PHP 8.0 or higher.
Installation
The package could be installed with composer:
General usage
Validating hydrator is a hydrator decorator that allows to validate raw data before passing it to the decorated hydrator and to validate object after creating or populating it.
To use it, the object being validated must implement ValidatedInputInterface
. You can use ValidatedInputTrait
to
easily create such object. The validation rules for raw values of the object are defined with Validate
PHP attribute.
Example of object:
Validation result could be obtained via its getValidationResult()
method.
Validating hydrator usage example:
Documentation
- Internals
License
The Yii Validating Hydrator is free software. It is released under the terms of the BSD License.
Please see LICENSE
for more information.
Maintained by Yii Software.