Provide the state or region no more than once

Error FX-SCH-A-000719 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

In ram:PostalTradeAddress, ram:CountrySubDivisionName occurs more than once. The element may appear there no more than once.

What the rule means

The address may contain at most one entry for a subdivision of the country. Multiple such elements result in repeated region entries.

Please provide the region in the end-user address no more than once

The end user’s postal address contains the region entry more than once. This element can appear there no more than once.

What to do
  1. Check ram:PostalTradeAddress for repeated ram:CountrySubDivisionName elements.
  2. Leave no more than one ram:CountrySubDivisionName element there.
  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 check counts the direct ram:CountrySubDivisionName elements within ram:PostalTradeAddress and allows no more than one.

Where the rule applies

The rule applies to the postal address of ram:ProductEndUserTradeParty in the invoice agreement.

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