Skip to content

vaibhavpandeyvpz/filtr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vaibhavpandeyvpz/filtr

Simple and fluent input validation for PHP >= 5.3.

Build status Code Coverage Latest Version Downloads PHP Version License

SensioLabsInsight

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.