Economic Operators Registration and Identification system (EORI) Validator

1.0 2022-07-15 13:34 UTC

This package is auto-updated.

Last update: 2024-09-15 18:09:26 UTC


README

Total Downloads Latest Stable Version License

Economic Operators Registration and Identification system (EORI) Validator

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.