PHP code example of singra / laravel-br-validation
1. Go to this page and download the library: Download singra/laravel-br-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/ */
singra / laravel-br-validation example snippets
use Singra\LaravelBrValidation\Casts\AsCpf;
use Singra\LaravelBrValidation\Rules\CpfRule;
$request->validate([
'document' => ['::class];
}
$holder->document; // Singra\BrValidation\Documents\Cpf
$holder->document->formatted(); // '111.444.777-35'
$holder->document->redacted(); // '***.444.777-**'