PHP code example of rnr1721 / le7-validator
1. Go to this page and download the library: Download rnr1721/le7-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/ */
rnr1721 / le7-validator example snippets
use Core\Utils\ValidatorFactory;
$validatorFactory = new ValidatorFactory();
$validator = $validatorFactory->getValidator();
$validator->setFullRule('login', 'john', 'xample.com', 'er age');
if ($validator->validate()) {
// Validation success
} else {
// Validation not success
$errors = $validator->getMessages();
}