PHP code example of vaibhavpandeyvpz / filtr
1. Go to this page and download the library: Download vaibhavpandeyvpz/filtr library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
vaibhavpandeyvpz / filtr example snippets
$v = new Filtr\Validator();
$v->->isHavingLength(8, 32);
$v->key('remember_me')->isTrue();
$result = $v->validate([
'email' => '[email protected]',
'password' => 'not-much-secret',
]);
if ($result->valid()) {
// ... proceed
} else {
echo implode('<br>', $result->errors());
}