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

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


$validator = new CYVatFormatValidator();
$validator->isValid('12345678A');
$validator->isValid('12345678B');
$validator->isValid('CY12345678Q');

$validator = new CYVatFormatValidator();
$validator->isValid('123456789X');
$validator->isValid('1234567X');
$validator->isValid('CY1234567X');
$validator->isValid('CY123456789X');