PHP code example of einlinuus / php-validator
1. Go to this page and download the library: Download einlinuus/php-validator 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/ */
einlinuus / php-validator example snippets
use EinLinuus\PhpValidator\EinLinuus\PhpValidator\Validator;
use EinLinuus\PhpValidator\EinLinuus\PhpValidator\ValidatorException;
t must be lowercase')
->min(3, 'Input must be at least 3 characters long')
->max(12, 'Input must be at most 12 characters long');
$validated = $validator->get();
} catch (ValidatorException $exception) {
echo 'Invalid: ' . $exception->getMessage();
}
bash
composer