richbarrett / eori-validator
Validate GB and EU EORI numbers
Installs: 33
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 1
Open Issues: 0
pkg:composer/richbarrett/eori-validator
Requires
- php: >=5.6.0
- ext-curl: *
- ext-soap: *
This package is not auto-updated.
Last update: 2025-10-08 20:02:45 UTC
README
Overview
This uses the following resources to validate GB and EU origin EORI numbers.
- https://ec.europa.eu/taxation_customs/dds2/eos/eori_validation.jsp?Lang=en
- https://www.gov.uk/check-eori-number
Usage
<?PHP try { echo \eorivalidator\eori::validate('GB981509987000') ? 'Valid' : 'NOT Valid'; } catch (\eorivalidator\serviceNotAvailableException $e) { die('The required web service was unavailable'); } catch (\eorivalidator\malformedEoriNumber $e) { die('Your EORI number was not formed correctly: '.$e->getMessage()); } ?>