vaibhavpandeyvpz / filtr
Simple and fluent input validation for PHP >= 5.3.
1.1
2017-03-01 06:57 UTC
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.