Telephone communication requires exactly one complete number

Error FX-SCH-A-001114 Factur-X

Element 'ram:CompleteNumber' must occur exactly 1 times.

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

ram:CompleteNumber does not occur exactly once in ram:TelephoneUniversalCommunication. The element is either missing or occurs more than once.

What the rule means

The telephone number is provided in ram:CompleteNumber. Exactly one such element ensures an unambiguous value.

Please provide one complete telephone number

ram:CompleteNumber is missing or occurs more than once in the telephone communication of the contact at the ultimate ship-to party. Having exactly one element resolves this issue.

What to do
  1. Locate the ram:TelephoneUniversalCommunication of the contact at the ultimate ship-to party.
  2. Check that it contains exactly one ram:CompleteNumber.
  3. Generate the invoice again and validate it.
What it looks like
✗ Triggers the message
<ram:TelephoneUniversalCommunication/>
✓ Correct
<ram:TelephoneUniversalCommunication>
  <ram:CompleteNumber>+33123456789</ram:CompleteNumber>
</ram:TelephoneUniversalCommunication>
Technical details

The test counts the direct ram:CompleteNumber child elements of ram:TelephoneUniversalCommunication and requires the count to be 1.

Where the rule applies

The rule applies to the telephone communication of the contact at the ultimate ship-to party of an invoice line.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ ram:SpecifiedLineTradeDelivery/ram:UltimateShipToTradeParty/ram:DefinedTradeContact/ ram:TelephoneUniversalCommunication
Test expression (assert/@test)
count(ram:CompleteNumber)=1