VatShape class abstract final

Offline syntactic validation of VAT numbers.

Two strategies are available, selected by RegexType: a per-country table of the formats the VIES member states publish (RegexType.eu), or a single permissive shape for anything else (RegexType.world). See VatShape.isValid.

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Properties

supportedCountryCodes → Iterable<String>
Country prefixes the RegexType.eu strategy knows.
no setter

Static Methods

isValid(String fullVatNumber, RegexType regexType) → bool
Whether fullVatNumber has a plausible shape.
normalize(String vatNumber) → String
Strips the separators a user may have typed and upper-cases the result.
split(String fullVatNumber) → ({String countryCode, String vatNumber})?
Splits fullVatNumber into the country prefix it carries and the number that follows it.