polderknowledge / entityservice-zend-validator
This library provides Zend\Validator support for the polderknowledge/entityservice library
Installs: 7 123
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 8
Forks: 0
Open Issues: 0
Requires
- php: ~5.5|~7.0
- polderknowledge/entityservice: ^3.0|^4.0
- zendframework/zend-validator: ^2.3|^3.0
Requires (Dev)
- phpunit/phpunit: ^4.7|^5.6
- polderknowledge/build-tools: ^2.0|^3.0
- polderknowledge/entityservice-module: ^1.0
- zendframework/zend-servicemanager: ^2.3|^3.0
This package is auto-updated.
Last update: 2024-12-12 05:18:11 UTC
README
This library provides Zend\Validator support for the polderknowledge/entityservice library
Install
Via Composer
$ composer require polderknowledge/entityservice-zend-validator
Usage
After you have configured the EntityService you can use the validators without further config:
namespace MyApp\InputFilter; use PolderKnowledge\EntityService\Validator\EntityExists; use Zend\InputFilter\InputFilter; use PonyApp\Entity\Pony; class PonyEditInputFilter extends InputFilter { /** * Initializes the input filter. */ public function init() { $this->add([ 'name' => 'ponyId', 'validators' => [ [ 'name' => EntityExists::class, // or EntityNotExists 'options' => [ 'entity' => Pony::class, 'field' => 'name', // defaults to id ], ], ], ]); } }
Change log
Please see CHANGELOG for more information what has changed recently.
Testing
$ composer test
Contributing
Please see CONTRIBUTING and CONDUCT for details.
Security
If you discover any security related issues, please report them via HackerOne instead of using the issue tracker or e-mail.
Community
We have an IRC channel where you can find us every now and then. We're on the Freenode network in the channel #polderknowledge.
Credits
License
Please see LICENSE.md for the license of this application.