1. Go to this page and download the library: Download habemus/vacuum-cleaner 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/ */
habemus / vacuum-cleaner example snippets
use Habemus\Vacuum\Cleaner;
$validator = new Cleaner(array_merge($_POST,$_FILES));
$validated = $validator->validate([
'name' => 'integer|gt:1',
'upload' => 'present|file|mimes:png,jpg|max:2000000',
]);
use Habemus\Vacuum\Cleaner;
use Habemus\Vacuum\Filters\CustomFilter;
$input = [
'murphy' => "Anything that can go wrong will go wrong",
];
$validator = new Cleaner($input);
$subject = 'wrong';
$data = $validator->validate([
'murphy' => [
'
use Habemus\Vacuum\Request;
$request = new Request(); //init from $_GET,$_POST,$_FILES global vars
$request = new Request($custom_data); //init with custom data
$validated_data = $request->validate($filters, $custom_validation_msgs = null, $sanitizer_fn = null); //validate data from request
$request->isValid(); // true or false
$request->getErrors(); //populated after validate()
$request->getValidated(); //populated after validate()
$request->getData(); // retrieve input data
$custom_messages = [
'field1_name' => 'Il campo non è valido!',
'field2_name' => 'You can use ###field### placeholder.',
];
$validator = new Cleaner($input_array,$custom_messages_array);