PHP code example of rocketfellows / nl-vat-format-validator

1. Go to this page and download the library: Download rocketfellows/nl-vat-format-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/ */

    

rocketfellows / nl-vat-format-validator example snippets


$validator = new NLVatFormatValidator();
$validator->isValid('NL123456789B01');
$validator->isValid('NL123456789BO2');
$validator->isValid('123456789B01');
$validator->isValid('123456789BO2');

$validator = new NLVatFormatValidator();
$validator->isValid('NL12345678B01');
$validator->isValid('NL1234567890B01');
$validator->isValid('NL123456789B011');
$validator->isValid('NL123456789B011');
$validator->isValid('1234567890B01');
$validator->isValid('12345678B01');
$validator->isValid('NL1234567890BO2');
$validator->isValid('NL123456789BA2');
$validator->isValid('1234567890BO2');
$validator->isValid('');