The postal address contains at most one country subdivision

Error FX-SCH-A-000434 Factur-X

Element 'ram:CountrySubDivisionName' may occur at maximum 1 times.

Mandatory rule: As long as it is violated, the invoice is invalid and will be rejected by validators.
What is wrong

ram:PostalTradeAddress contains more than one ram:CountrySubDivisionName. The element may occur at most once.

What the rule means

ram:CountrySubDivisionName contains the name of a geographic subdivision within the country. The address allows at most one such name.

Please provide at most one country subdivision in the tax representative’s postal address

ram:CountrySubDivisionName appears more than once in the tax representative’s postal address. This element may occur at most once.

What to do
  1. Locate the tax representative’s ram:PostalTradeAddress.
  2. Make sure it contains no more than one ram:CountrySubDivisionName.
  3. Regenerate the invoice and validate it again.
What it looks like
✗ Triggers the message
<ram:PostalTradeAddress>
  <ram:CountrySubDivisionName>Region A</ram:CountrySubDivisionName>
  <ram:CountrySubDivisionName>Region B</ram:CountrySubDivisionName>
</ram:PostalTradeAddress>
✓ Correct
<ram:PostalTradeAddress>
  <ram:CountrySubDivisionName>Region A</ram:CountrySubDivisionName>
</ram:PostalTradeAddress>
Technical details

The test counts the direct ram:CountrySubDivisionName elements in ram:PostalTradeAddress and requires a count of no more than 1.

Where the rule applies

The postal address of the seller’s tax representative.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ ram:SellerTaxRepresentativeTradeParty/ram:PostalTradeAddress
Test expression (assert/@test)
count(ram:CountrySubDivisionName)<=1