PHP code example of fracto-team / php-validation
1. Go to this page and download the library: Download fracto-team/php-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/ */
fracto-team / php-validation example snippets
use Fracto\Validation\Exceptions\ValidationException;
use Fracto\Validation\Validator;
dator = Validator::make($rules, $input);
try {
$validator->validate();
} catch (ValidationException $e) {
var_dump($e->getMessage(), $e->getErrors());
}