PHP code example of bartosz-maciaszek / validation
1. Go to this page and download the library: Download bartosz-maciaszek/validation 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/ */
bartosz-maciaszek / validation example snippets
use Validation\Validation as V;
V::validate('foobar', V::string(), function($err, $output) {
if ($err) {
echo 'Validation failed: ' . $err;
exit;
}
echo $output; // 'foobar'
});