PHP code example of brenno-duarte / validator

1. Go to this page and download the library: Download brenno-duarte/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/ */

    

brenno-duarte / validator example snippets




use Validator\Validator;

$val = new Validator();

$res = $val->cpf("000.000.000-00");

var_dump($res);

$res = $val->phone("(00) 90000-0000");

var_dump($res);

$res = $val->cnpj("00.000.000/0000-00");

var_dump($res);

$res = $val->email("[email protected]");

var_dump($res);

$res = $val->url("https://vendascontrol.com.br");

var_dump($res);