PHP code example of rocketfellows / fr-vat-format-validator
1. Go to this page and download the library: Download rocketfellows/fr-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 / fr-vat-format-validator example snippets
$validator = new FRVatFormatValidator();
$validator->isValid('FR12345678901');
$validator->isValid('FRX1234567890');
$validator->isValid('FR1X234567890');
$validator->isValid('FRXX234567890');
$validator->isValid('12345678901');
$validator->isValid('X1234567890');
$validator->isValid('1X123456789');
$validator->isValid('XX123456789');
$validator = new FRVatFormatValidator();
$validator->isValid('FR123456789011');
$validator->isValid('FR1234567890');
$validator->isValid('123456789011');
$validator->isValid('1234567890');
$validator->isValid('FRX12345678900');
$validator->isValid('FRX123456789');
$validator->isValid('FR1X2345678900');
$validator->isValid('FR1X23456789');
$validator->isValid('FRXX2345678900');
$validator->isValid('FRXX23456789');
$validator->isValid('X12345678900');
$validator->isValid('1X1234567890');
$validator->isValid('1X12345678');
$validator->isValid('XX1234567890');
$validator->isValid('XX12345678');
$validator->isValid('DEXX123456789');