# CF405

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

> Postcode maximum length is 5 digits in Malaysia and 50 characters elsewhere - ….

- 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: `$postal = '' or (if ($country = 'MYS') then matches($postal, '^[0-9]{1,5}$') else string-length($postal) le 50)`

## Why it fails

- A Malaysian postcode with a space or a dash, or with the city in the same field.

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