PHP code example of eugabrielsilva / glowie-br-validator
1. Go to this page and download the library: Download eugabrielsilva/glowie-br-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/ */
eugabrielsilva / glowie-br-validator example snippets
'plugins' => [
// ... outros plugins
\Glowie\Plugins\BrValidator\BrValidator::class,
],
use Glowie\Core\Tools\Validator;
$validator = new Validator();
$isValid = $validator->validate($data, 'custom:cpf');
// Nas novas versões do Glowie, também é possível passar apenas o nome da regra, ex:
$isValid = $validator->validate($data, 'cpf');