Provide no more than one subdivision in the final delivery address

Error FX-SCH-A-000842 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:CountrySubDivisionName occurs more than once in the postal address of UltimateShipToTradeParty. The element may occur there no more than once.

What the rule means

ram:CountrySubDivisionName identifies a subdivision within the country specified for the delivery address. Multiple values for this element are not permitted here.

Please enter no more than one subdivision in the final delivery address

ram:CountrySubDivisionName has been entered more than once in the final delivery address. You can limit the entry there to no more than one.

What to do
  1. Open the postal address under UltimateShipToTradeParty.
  2. Limit ram:CountrySubDivisionName there to no more than one entry.
  3. Generate the invoice again 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 direct ram:CountrySubDivisionName elements within the relevant ram:PostalTradeAddress and permits no more than one.

Where the rule applies

The rule applies to the postal address in UltimateShipToTradeParty within the delivery details.

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