API reference / Quittio \ Core \ Validation \ Plausibility
VatIdFormat
final class in quittio/core
Quittio\Core\Validation\Plausibility\VatIdFormat · Source
Format of VAT identification numbers by country prefix (structure only, no check digits).
Methods#
| Method | Description |
|---|---|
::isSmallBusinessId() | Small business identification number of the cross-border small business scheme (Article 284 (3) VAT Directive): the country code, then the number with the suffix "EX", e.g. DE123456789EX or PL1234567890-EX. It is no VAT identifier; its format apart from the suffix is up to each member state. |
::isValid() | Returns null if the country prefix is unknown (no statement possible). |
isSmallBusinessId()#
public static function isSmallBusinessId(string $value): boolSmall business identification number of the cross-border small business scheme (Article 284 (3) VAT Directive): the country code, then the number with the suffix "EX", e.g. DE123456789EX or PL1234567890-EX. It is no VAT identifier; its format apart from the suffix is up to each member state.
| Parameter | Type | Description |
|---|---|---|
$value | string |
- Returns
bool
isValid()#
public static function isValid(string $vatId): ?boolReturns null if the country prefix is unknown (no statement possible).
| Parameter | Type | Description |
|---|---|---|
$vatId | string |
- Returns
?bool