diff --git a/src/DataType/Identifier/VatIdentifier.php b/src/DataType/Identifier/VatIdentifier.php index 5c39449..4665f7c 100644 --- a/src/DataType/Identifier/VatIdentifier.php +++ b/src/DataType/Identifier/VatIdentifier.php @@ -4,23 +4,13 @@ namespace Tiime\EN16931\DataType\Identifier; -use Tiime\EN16931\Codelist\CountryAlpha2Code; - readonly class VatIdentifier { private string $value; public function __construct(string $value) { - $countryCode = substr($value, 0, 2); - - if (null === CountryAlpha2Code::tryFrom($countryCode) && $countryCode !== 'EL') { - throw new \Exception('@todo : BR-CO-9'); - } - $this->value = $value; - - // @todo : Verification for length ? 13 SellerTaxRepresentativeTradeParty / 15 Buyer / 14 Seller (Annexe 1) } public function getValue(): string diff --git a/src/SemanticDataType/DecimalNumber.php b/src/SemanticDataType/DecimalNumber.php index 645a6a4..366c01e 100644 --- a/src/SemanticDataType/DecimalNumber.php +++ b/src/SemanticDataType/DecimalNumber.php @@ -10,12 +10,6 @@ public function __construct( private float $value, private ?int $decimals = null ) { - if ( - $this->decimals !== null - && !preg_match(sprintf('/^-?\d+(\.\d{1,%s})?$/', $decimals), (string) $value) - ) { - throw new \Exception('@todo'); - } } public function getValue(): float