# CV317

Source: https://xmlvalid.com/rules/CV317

> State Code 17 should be used for Consolidated e-Invoice and non-Malaysian address only - the …'s address is in MYS and the document is not consolidated.

- Level: error
- Rule sets: MyInvois validations of LHDN (Malaysia) MyInvois SDK of 25 September 2026
- Context: `/*/cac:AccountingSupplierParty/cac:Party | /*/cac:AccountingCustomerParty/cac:Party`
- Test: `$state ne '17' or $foreign or $consolidated`

## Why it fails

- State 17 (Not Applicable) given for a Malaysian address of a document that is not consolidated.

## How to fix it

- Give the state of the address, 01 to 16; keep 17 for a foreign address and the buyer of a consolidated e-invoice.

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