Rules
VRBL-APR-PT-2p1-5
Basic Info
| Rule | The Sender Party Tax Company ID must be preceded by a 2-letter ISO 3166-1 alpha-2 country code, followed by alphanumeric characters. Example: PT123456789. |
| Context |
/ubl:ApplicationResponse/cac:SenderParty/cac:PartyTaxScheme/cbc:CompanyID
|
| Pattern | vrbl-ar-pt-2p1 |
| Severity | fatal |
Implementation
string-length(normalize-space(.)) >= 3
and
contains($VRBL-CL-AR-CountryCode, concat(' ', substring(normalize-space(.), 1, 2), ' '))
and
string-length(translate(substring(normalize-space(.), 3), $AlphaNumerics, '')) = 0