Specify no more than one subdivision

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

The postal address contains ram:CountrySubDivisionName more than once. This element may occur no more than once in this address.

What the rule means

ram:CountrySubDivisionName identifies a subdivision of a country, such as a state or region. This rule does not allow multiple values for this single address detail.

Please provide no more than one subdivision in the invoice recipient’s address

The invoice recipient’s address contains ram:CountrySubDivisionName more than once. Keep no more than one entry for this field.

What to do
  1. Locate the postal address of the invoice recipient’s legal organization.
  2. Remove any extra ram:CountrySubDivisionName entries.
  3. Generate the invoice again and validate it once more.
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 XPath counts the direct ram:CountrySubDivisionName elements in ram:PostalTradeAddress and permits at most one.

Where the rule applies

In the postal address of the invoice recipient’s legal organization.

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