# BR-51

Source: https://xmlvalid.com/rules/BR-51

> 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.

- Level: warning
- Rule sets: EN 16931 rules (UBL) 1.3.17, EN 16931 rules 1.3.16 (UBL), EXTENDED-CTC-FR rules (UBL) 1.4.0.04
- Context: `cac:PaymentMeans/cac:CardAccount/cbc:PrimaryAccountNumberID`
- Test: `string-length(normalize-space(.))<=10`

> In accordance with card payments security standards an invoice should never include a full card primary account number (BT-97). 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.

- Level: error
- Rule sets: EN 16931 rules (CII) 1.3.17, EN 16931 rules 1.3.16 (CII), EXTENDED-CTC-FR rules (CII) 1.4.0.04
- Context: `//ram:ApplicableTradeSettlementFinancialCard`
- Test: `string-length(normalize-space(ram:ID)) <= 10`

> 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.

- Level: warning
- Rule sets: Romanian RO e-Factura rules (UBL) 1.0.9
- Context: `cac:PaymentMeans/cac:CardAccount`
- Test: `string-length(cbc:PrimaryAccountNumberID)<=10`

> 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.

- Level: error
- Rule sets: Factur-X EN 16931 rules 1.09.2, Factur-X EXTENDED rules 1.09.2
- Context: `//ram:ApplicableTradeSettlementFinancialCard`
- Test: `string-length(normalize-space(ram:ID)) <= 10`

Validate a document against these rules: https://xmlvalid.com/validate
