# XV-MY-16

Source: https://xmlvalid.com/rules/XV-MY-16

> A Malaysian TIN is IG and digits for an individual; for others C, CS, D, F, FA, PT, TA, TC, TN, TR, TP, J or LE, then digits without a leading zero, ending with 0; at most 14 characters. The …'s TIN, …, is not in that form.

- Level: warning
- Rule sets: MyInvois validations of LHDN (Malaysia) MyInvois SDK of 25 September 2026
- Context: `/*/cac:AccountingSupplierParty/cac:Party | /*/cac:AccountingCustomerParty/cac:Party`
- Test: `$tin = '' or $general or (string-length($tin) le 14 and matches($tin, '^(IG[0-9]+|(C|CS|D|F|FA|PT|TA|TC|TN|TR|TP|J|LE)[1-9][0-9]*0)$'))`

## Why it fails

- A TIN with the old individual prefix OG or SG, now IG.
- A non-individual TIN with a zero after the prefix (C01234567890), or without the zero LHDN now adds at the end (C123456789).

## How to fix it

- Check the TIN with LHDN's Search TIN function, and write it as it gives it: C1234567890 for C01234567890 or C123456789.

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