Simple and fluent input validation for PHP >= 5.3.

1.1 2017-03-01 06:57 UTC

This package is auto-updated.

Last update: 2024-12-07 00:27:02 UTC


README

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.