psx / validate
Validate data through a filter system
Fund package maintenance!
chriskapp
Patreon
www.paypal.me/fusioapi
Installs: 188 300
Dependents: 3
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
Requires
- php: >=8.0
Requires (Dev)
- phpunit/phpunit: ^9.0
- vimeo/psalm: ^5.0
README
About
Validation library which validates arbitrary data using a flexible filter system.
Usage
<?php use PSX\Validate\Filter; use PSX\Validate\Validate; $validate = new Validate(); $result = $validate->validate($data, Validate::TYPE_STRING, [new Filter\Alnum(), new Filter\Length(3, 255)]); if ($result->isSuccessful()) { echo 'Valid!'; } else { echo implode(', ', $result->getErrors()); }