- CakePHP 2.9.0 or greater.
- PHP 7.0.0 or greater.
Clone/Copy the files in this directory into app/Plugin/VatNumberCheck
Ensure the plugin is loaded in app/Config/bootstrap.php
by calling:
CakePlugin::load('VatNumberCheck', ['routes' => true]);
Normalizes a VAT number:
$vatNumber = $this->VatNumberCheck->normalize($vatNumber);
Checks a given VAT number:
$vatNumberValid = $this->VatNumberCheck->check($vatNumber);
Generates a VAT number check form field:
echo $this->VatNumberCheck->input('vat_number', ['label' => __('VAT number')]);