You can install the package via composer:
composer require tleckie/validator
<?php
require "vendor/autoload.php";
use Tleckie\Validator\ValidatorFactory;
$validator = new ValidatorFactory();
$validator->boolValidator()->isValid('true'); // false
$validator->emailValidator()->isValid('[email protected]'); // true
$validator->floatValidator()->isValid(1.22); // true
$validator->intValidator()->isValid(1.22); // false
$validator->numericValidator()->isValid(1.22); // true
$validator->stringValidator()->isValid("1.22"); // true
$validator->uriValidator()->isValid("https://hostname.dev/path/"); // true