vaibhavpandeyvpz / filtr
Simple and fluent input validation for PHP >= 5.3.
Installs: 29
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/vaibhavpandeyvpz/filtr
Requires
- php: ^5.3 || ^7.0
Requires (Dev)
- phpunit/phpunit: ^4.0 || ^5.0
README
Simple and fluent input validation for PHP >= 5.3.
Preview (झलक)
<?php $v = new Filtr\Validator(); $v->required('email')->isNotBlank()->isEmailAddress(); $v->required('password')->isNotBlank()->isHavingLength(8, 32); $v->key('remember_me')->isTrue(); $result = $v->validate([ 'email' => 'contact@vaibhavpandey.com', 'password' => 'not-much-secret', ]); if ($result->valid()) { // ... proceed } else { echo implode('<br>', $result->errors()); }
Documentation
Detailed installation and usage instructions can be found in the Wiki.
License
See LICENSE.md file.