PHP code example of cosmin-ciolacu / eu-vat-number-validator

1. Go to this page and download the library: Download cosmin-ciolacu/eu-vat-number-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/ */

    

cosmin-ciolacu / eu-vat-number-validator example snippets



use CosminCiolacu\EuVatNumberValidator\EuVatNumberValidator;

$vatNumber = 'RO123456789';
$isValid = EuVatNumberValidator::validate($vatNumber);

if ($isValid) {
    echo 'VAT number is valid';
} else {
    echo 'VAT number is not valid';
}

use CosminCiolacu\EuVatNumberValidator\Rules\EUVatNumberValidationRule;

$rules = [
    'vat_number' => ['