Limit the card number to ten characters

Error BR-51 EN 16931

In accordance with card payments security standards an invoice should never include a full card primary account number (BT-87). At the moment PCI Security Standards Council has defined that the first 6 digits and last 4 digits are the maximum number of digits to be shown.

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

After whitespace normalization, the content of ram:ID is longer than ten characters. This exposes more than the ten card-number digits allowed by the rule (BT-87).

What the rule means

The limit prevents the invoice from containing the full primary account number of the card. The rule specifies at most the first six and last four digits, for a maximum of ten digits.

Affected fields BT-87
Please show no more than ten characters of the card number

The card number provided in ram:ID is longer than allowed. Reduce the displayed value to no more than ten characters.

What to do
  1. Find ram:ID in ram:ApplicableTradeSettlementFinancialCard.
  2. Limit the value shown there to no more than ten characters.
  3. Generate the invoice again and validate it once more.
What it looks like
✗ Triggers the message
<ram:ApplicableTradeSettlementFinancialCard>
  <ram:ID>12345678901</ram:ID>
</ram:ApplicableTradeSettlementFinancialCard>
✓ Correct
<ram:ApplicableTradeSettlementFinancialCard>
  <ram:ID>1234567890</ram:ID>
</ram:ApplicableTradeSettlementFinancialCard>
Technical details

The XPath test applies normalize-space to ram:ID and requires the resulting string length to be no greater than 10.

Where the rule applies

The rule applies to ram:ID within ram:ApplicableTradeSettlementFinancialCard at document level.

Context (rule/@context)
//ram:ApplicableTradeSettlementFinancialCard
Test expression (assert/@test)
string-length(normalize-space(ram:ID)) <= 10