1. Go to this page and download the library: Download maplephp/validate 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/ */
maplephp / validate example snippets
use MaplePHP\Validate\Inp;
// Validate option 1
$inp = new Inp("Lorem ipsum dolor");
var_dump($inp->length(1, 200)); // true
// Validate option 2
$valid = Inp::value("Lorem ipsum dolor")->length(1, 200);
var_dump($valid); // true
Inp::value("Lorem ipsum dolor")->
Inp::value(0)->hasValue();
Inp::value("Lorem ipsum dolor")->length(1);
Inp::value("Lorem ipsum dolor")->length(1, 160);
Inp::value("Lorem ipsum dolor")->equalLength(10);
Inp::value("Lorem ipsum dolor")->equal("Lorem ipsum dolor");
Inp::value("Lorem ipsum dolor")->notEqual("Lorem ipsum");