PHP code example of marrios / validators

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

    

marrios / validators example snippets


  use DV\DataValidator as Data;
  
  return Data::isCnpj('06.990.590/0001-23');

// Validador de NOME
Data::IsName(String);

// Validador de CNPJ
Data::isCnpj(String);

// Validador de CPF
Data::isCpf(String);

// Retorna o CNPJ formatado com pontuação
Data::cnpjWithScore(String);

// Retorna o CPF formatado com pontuação
Data::cpfWithScore(String);

// Validador de CEP
Data::isCep(String);