davidvandertuijn / eori
Economic Operators Registration and Identification system (EORI) Validator
Installs: 2 930
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: >=7.0.0
This package is auto-updated.
Last update: 2024-09-15 18:09:26 UTC
README
Install
composer require davidvandertuijn/eori
Usage
use Davidvandertuijn\Eori\Validator as EoriValidator;
Validate
$eori = new EoriValidator; $eori->validate('NL857117683'); // true if ($eori->isValid()) { // true }
Strict (optional)
When strict is set to false, the EORI number validation returns true if the SOAP service is not available (CURL timeout or SoapFault).
$eori->setStrict(false); // default = true
Comments
We suggest that you cache the valid EORI numbers in your application to prevent multiple requests to the SOAP service.