1. Go to this page and download the library: Download gajus/vlad 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/ */
$translator = new \Gajus\Vlad\Translator();
$translator->setInputName('foo[bar_tar_id]', 'Bar Tar');
$test = new \Gajus\Vlad\Test();
$test
->assert('foo_bar')
->is('NotEmpty');
$assessment = $test->assess([]);
$translator = new \Gajus\Vlad\Translator();
$translator->setValidatorMessage('NotEmpty', '{input.name} cannot be left empty.');
$test = new \Gajus\Vlad\Test($translator);
$test
->assert('foo_bar')
->is('NotEmpty');
$assessment = $test->assess([]);
$test = new \Gajus\Vlad\Test();
$test
->assert('foo_bar')
->is('NotEmpty', null, ['message' => 'You must provide Foo Bar value.']);