Download the PHP package atasciuc/zend-expressive-validation without Composer
On this page you can find all versions of the php package atasciuc/zend-expressive-validation. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download atasciuc/zend-expressive-validation
More information about atasciuc/zend-expressive-validation
Files in atasciuc/zend-expressive-validation
Package zend-expressive-validation
Short Description PSR-7 Validation middleware for zend-expressive
License BSD-3-Clause
Informations about the package zend-expressive-validation
Expressive Validator
Validation library for the zend-expressive (http://zend-expressive.readthedocs.org/en/latest)
Installation
Using composer!
Usage
1. ----
Create a validator factory
Note:
The entityManager is optional and required only if you want to use database validation classes such as EntityExist
2. ----
Add the validator classes to the dependecies.php
of your project
3. ----
Edit your middleware-pipeline.global
and register the validation middlewares
Note
Or you can add your own ErrorMiddleware
and register it in you dependencies, example of the one provided:
4. ----
To your route add the validation to the route:
The validation might be aplyed to the http method or to all the methods:
The validation rules class my comply to the - ValidationRulesInterface
Example of the validation rules:
5. ----
Now in your action you can extract the validated data:
That it is it
ToDo
[] - add docs to the validation classes
All versions of zend-expressive-validation with dependencies
roave/security-advisories Version dev-master
zendframework/zend-expressive Version ^0.5
zendframework/zend-stdlib Version ~2.7
zendframework/zend-expressive-fastroute Version ^0.1
zendframework/zend-servicemanager Version ^2.5
doctrine/orm Version *
zendframework/zend-validator Version ^2.5
zendframework/zend-http Version ^2.5
zendframework/zend-i18n Version ^2.5
zendframework/zend-filter Version ^2.5
symfony/serializer Version ^2.7
doctrine/doctrine-module Version 0.*
mtdowling/cron-expression Version ^1.0
nesbot/carbon Version ^1.21
fzaninotto/faker Version ~1.5.0