PHP code example of rodineiti / php-rdn-validator
1. Go to this page and download the library: Download rodineiti/php-rdn-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/ */
rodineiti / php-rdn-validator example snippets
sh
Validator\Validator\Validator;
if (isset($_POST['submit'])) {
$rules = [
'username' => [','cnpj'],
];
$messages = [
'
$validator = (new Validator($_POST, $rules, $messages))->passes();
$errors = $validator->fails() ? $validator->getErrors() : [];
var_dump($errors);
}