At most one country subdivision in the ship-to address

Error FX-SCH-A-000456 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 ram:PostalTradeAddress. The element may appear no more than once.

What the rule means

ram:CountrySubDivisionName contains the name of a country subdivision in the ship-to address. The rule limits this information to one element.

Please include the ship-to country subdivision no more than once

The ship-to postal address contains ram:CountrySubDivisionName more than once. You can remove the extra entries or omit the information.

What to do
  1. Check the ram:CountrySubDivisionName elements in ram:PostalTradeAddress.
  2. Remove any extra elements or omit the information.
  3. Generate the invoice again and validate it.
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 rule counts the direct ram:CountrySubDivisionName elements under ram:PostalTradeAddress and allows no more than one.

Where the rule applies

The rule applies to the ship-to party’s postal address, ram:PostalTradeAddress.

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