# MyInvois validations of LHDN (Malaysia) MyInvois SDK of 25 September 2026

Source: https://xmlvalid.com/rules/sets/my-myinvois

> 75 rules by xmlvalid, after the MyInvois SDK of the Inland Revenue Board of Malaysia (LHDN) and its e-Invoice guidelines (MIT). Source: https://sdk.myinvois.hasil.gov.my/document-validation-rules/

- [CF345](https://xmlvalid.com/rules/CF345.md) (error): Address Line maximum length is 150 characters. (Count: …) - the supplier's address.
- [CF346](https://xmlvalid.com/rules/CF346.md) (error): Address Line maximum length is 150 characters. (Count: …) - the buyer's address.
- [CF378](https://xmlvalid.com/rules/CF378.md) (error): Invoice currency code is required: give cbc:DocumentCurrencyCode.
- [CF400](https://xmlvalid.com/rules/CF400.md) (error): E-mail address maximum length is 320 characters - the …'s has ….
- [CF401](https://xmlvalid.com/rules/CF401.md) (error): Enter valid e-mail address - ….
- [CF404](https://xmlvalid.com/rules/CF404.md) (error): City name maximum length is 50 characters - ….
- [CF405](https://xmlvalid.com/rules/CF405.md) (error): Postcode maximum length is 5 digits in Malaysia and 50 characters elsewhere - ….
- [CF406](https://xmlvalid.com/rules/CF406.md) (error): Enter valid SST registration number - …: letters, digits and dashes, at most two numbers separated by a semicolon, up to 35 characters, or NA.
- [CF407](https://xmlvalid.com/rules/CF407.md) (error): Enter valid TTX registration number - …: letters, digits and dashes only, or NA.
- [CF408](https://xmlvalid.com/rules/CF408.md) (error): Phone Number Minimum length is 8 characters - ….
- [CF409](https://xmlvalid.com/rules/CF409.md) (error): Phone Number Maximum length is 20 characters - ….
- [CF410](https://xmlvalid.com/rules/CF410.md) (error): Enter valid phone number - …: digits with an optional leading plus, no spaces, dashes or brackets.
- [CF412](https://xmlvalid.com/rules/CF412.md) (error): Enter valid TTX registration number and maximum length is 17 characters - ….
- [CV302](https://xmlvalid.com/rules/CV302.md) (error): ItemCode … does not exist in CodeType EInvoiceTypes: the e-invoice type (InvoiceTypeCode) is 01 (invoice), 02 (credit note), 03 (debit note), 04 (refund note), or 11 to 14 for the self-billed ones.
- [CV316](https://xmlvalid.com/rules/CV316.md) (error): State Codes 01-16 must be restricted to MYS only - the …'s state is … and its country ….
- [CV317](https://xmlvalid.com/rules/CV317.md) (error): 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.
- [DC501](https://xmlvalid.com/rules/DC501.md) (error): Tax Amount currency code is not same as TaxCurrencyCode: with TaxCurrencyCode …, every cbc:TaxAmount is in …, not ….
- [DC502](https://xmlvalid.com/rules/DC502.md) (error): If the document currency is …, all currency codes for amounts should also be …; this document has amounts in ….
- [DC510](https://xmlvalid.com/rules/DC510.md) (error): Foreign source currency does not match document currency: TaxExchangeRate's SourceCurrencyCode is …, the document currency ….
- [DC512](https://xmlvalid.com/rules/DC512.md) (error): Tax currency is not empty, therefore it should match the document currency or should be MYR: TaxCurrencyCode is … and the document currency ….
- [DS301](https://xmlvalid.com/rules/DS301.md) (error): Signature not found. Version … is signed: the document needs the signature (ds:Signature in ext:UBLExtensions) and the cac:Signature element that points to it.
- [DS303](https://xmlvalid.com/rules/DS303.md) (error): Signing time not found: the signed properties need xades:SigningTime.
- [DS322](https://xmlvalid.com/rules/DS322.md) (error): Document digest value doesn't match digest calculated value from existing document content. Document content might have changed: the signature states …, the document's digest is … (… with the whitespace between elements).
- [ERR208](https://xmlvalid.com/rules/ERR208.md) (error): General TIN (020) is not applicable for foreign supplier: EI00000000020 is for foreign buyers; a foreign supplier takes EI00000000030.
- [ERR211](https://xmlvalid.com/rules/ERR211.md) (error): General TIN (020) is not applicable for foreign supplier for consolidated invoice.
- [ERR213](https://xmlvalid.com/rules/ERR213.md) (error): General TIN (010) is not applicable for foreign supplier: a foreign supplier takes EI00000000030.
- [ERR217](https://xmlvalid.com/rules/ERR217.md) (error): Supplier's details cannot be general TIN (010) for issuance of individual e-Invoice: with a BRN (…), give the supplier's own TIN.
- [ERR220](https://xmlvalid.com/rules/ERR220.md) (error): General TIN (30) is only allowed for supplier field for self-billed scenario: ….
- [ERR222](https://xmlvalid.com/rules/ERR222.md) (error): Only general TIN (010) is allowed for NRIC/ARMY: the … has an NRIC or army number and the general TIN ….
- [ERR229](https://xmlvalid.com/rules/ERR229.md) (error): General TIN (030) is only allowed for foreign supplier: the buyer's TIN is EI00000000030.
- [ERR236](https://xmlvalid.com/rules/ERR236.md) (error): Where General TIN (010) and ID Type BRN/NRIC = NA, applicable for Classification Code 004 only: the document has no line classified 004 (consolidated e-invoice).
- [ERR237](https://xmlvalid.com/rules/ERR237.md) (error): Buyer's details cannot be general TIN (010) for issuance of individual e-Invoice: with a BRN (…), give the buyer's own TIN.
- [ERR255](https://xmlvalid.com/rules/ERR255.md) (error): General TIN (040) is applicable for BRN NA only.
- [XV-MY-01](https://xmlvalid.com/rules/XV-MY-01.md) (error): The e-invoice version (listVersionID of InvoiceTypeCode) is 1.0 or 1.1 (signed), or 1.2 or 1.3 (signed) for the Voluntary Disclosure programme, not ….
- [XV-MY-02](https://xmlvalid.com/rules/XV-MY-02.md) (error): The e-invoice code or number (cbc:ID) takes up to 50 characters; this one has ….
- [XV-MY-03](https://xmlvalid.com/rules/XV-MY-03.md) (error): The e-invoice time (cbc:IssueTime) is mandatory.
- [XV-MY-04](https://xmlvalid.com/rules/XV-MY-04.md) (warning): The e-invoice time (cbc:IssueTime) should be in UTC, as 15:30:00Z: MyInvois reads the date and time of issue as UTC. This one is ….
- [XV-MY-05](https://xmlvalid.com/rules/XV-MY-05.md) (error): A document in another currency than MYR needs the exchange rate to MYR: cac:TaxExchangeRate with cbc:CalculationRate, the document currency as SourceCurrencyCode and MYR as TargetCurrencyCode. This one is in ….
- [XV-MY-06](https://xmlvalid.com/rules/XV-MY-06.md) (error): The exchange rate's TargetCurrencyCode is MYR, not ….
- [XV-MY-07](https://xmlvalid.com/rules/XV-MY-07.md) (error): The total tax amount (cac:TaxTotal/cbc:TaxAmount) and a tax amount per tax type (cac:TaxSubtotal) are mandatory, also when no tax is charged.
- [XV-MY-08](https://xmlvalid.com/rules/XV-MY-08.md) (error): The total excluding tax (TaxExclusiveAmount) and the total including tax (TaxInclusiveAmount) of cac:LegalMonetaryTotal are mandatory.
- [XV-MY-09](https://xmlvalid.com/rules/XV-MY-09.md) (warning): A credit, debit or refund note gives the original e-invoice it adjusts: cac:BillingReference/cac:InvoiceDocumentReference with its number (cbc:ID) and its MyInvois unique identifier (cbc:UUID; NA when the original was issued before e-invoicing).
- [XV-MY-10](https://xmlvalid.com/rules/XV-MY-10.md) (warning): A consolidated e-invoice (classification 004) is issued to the general public: the …'s TIN is EI00000000010, not …, with the name General Public and NA for the registration number, address and contact.
- [XV-MY-11](https://xmlvalid.com/rules/XV-MY-11.md) (error): The signature (ds:SignatureValue) does not verify with the public key of the certificate in the signature over the document digest it states.
- [XV-MY-12](https://xmlvalid.com/rules/XV-MY-12.md) (error): The certificate digest in the signed properties (xades:CertDigest) is the SHA-256 of the certificate in the signature: …, not ….
- [XV-MY-13](https://xmlvalid.com/rules/XV-MY-13.md) (warning): The certificate's organization identifier should be the TIN of the supplier or the buyer: MyInvois rejects a document whose signer's TIN is not the submitter's (DS311). This one is ….
- [XV-MY-14](https://xmlvalid.com/rules/XV-MY-14.md) (error): The name of the supplier and of the buyer (cac:PartyLegalEntity/cbc:RegistrationName) is mandatory, up to 300 characters; the …'s is missing or longer.
- [XV-MY-15](https://xmlvalid.com/rules/XV-MY-15.md) (error): The TIN of the supplier and of the buyer is mandatory: cac:PartyIdentification/cbc:ID with schemeID TIN (a general TIN such as EI00000000010 where LHDN allows one); the … has none.
- [XV-MY-16](https://xmlvalid.com/rules/XV-MY-16.md) (warning): 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.
- [XV-MY-17](https://xmlvalid.com/rules/XV-MY-17.md) (error): The registration or identification number of the supplier and of the buyer is mandatory: cac:PartyIdentification/cbc:ID with schemeID BRN, NRIC, PASSPORT or ARMY (NA where LHDN allows it); the … has none.
- [XV-MY-18](https://xmlvalid.com/rules/XV-MY-18.md) (warning): The SST registration number of the supplier and of the buyer is a mandatory field: cac:PartyIdentification/cbc:ID with schemeID SST, NA when not registered; the … has none.
- [XV-MY-19](https://xmlvalid.com/rules/XV-MY-19.md) (warning): The supplier's tourism tax registration number is a mandatory field: cac:PartyIdentification/cbc:ID with schemeID TTX, NA when not registered.
- [XV-MY-20](https://xmlvalid.com/rules/XV-MY-20.md) (error): The supplier's MSIC code (cbc:IndustryClassificationCode, five digits; 00000 when not applicable) is mandatory.
- [XV-MY-21](https://xmlvalid.com/rules/XV-MY-21.md) (warning): The supplier's business activity description (the name attribute of cbc:IndustryClassificationCode) is a mandatory field.
- [XV-MY-22](https://xmlvalid.com/rules/XV-MY-22.md) (error): The address of the supplier and of the buyer (cac:PostalAddress with an address line) is mandatory, NA in the first line where LHDN allows it; the … has none.
- [XV-MY-23](https://xmlvalid.com/rules/XV-MY-23.md) (error): An address needs the city (cbc:CityName), the state (cbc:CountrySubentityCode) and the country (cac:Country/cbc:IdentificationCode), unless its first line is NA; the …'s lacks one.
- [XV-MY-24](https://xmlvalid.com/rules/XV-MY-24.md) (error): The contact number of the supplier and of the buyer (cac:Contact/cbc:Telephone) is mandatory, NA where LHDN allows it; the … has none.
- [XV-MY-25](https://xmlvalid.com/rules/XV-MY-25.md) (error): Each line needs its classification: cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode with listID CLASS; line … has none.
- [XV-MY-26](https://xmlvalid.com/rules/XV-MY-26.md) (error): Each line needs the description of the product or service (cac:Item/cbc:Description), up to 300 characters; line … has none or a longer one.
- [XV-MY-27](https://xmlvalid.com/rules/XV-MY-27.md) (error): Each line needs its unit price (cac:Price/cbc:PriceAmount); line … has none.
- [XV-MY-28](https://xmlvalid.com/rules/XV-MY-28.md) (error): Each line needs its subtotal (cac:ItemPriceExtension/cbc:Amount), the unit price times the quantity; line … has none.
- [XV-MY-29](https://xmlvalid.com/rules/XV-MY-29.md) (error): Each line needs its tax amount (cac:TaxTotal/cbc:TaxAmount) and tax type (cac:TaxSubtotal/cac:TaxCategory/cbc:ID), also when no tax is charged; line … lacks them.
- [XV-MY-30](https://xmlvalid.com/rules/XV-MY-30.md) (warning): A line's subtotal (ItemPriceExtension) is its unit price times its quantity: … in line …, not ….
- [XV-MY-31](https://xmlvalid.com/rules/XV-MY-31.md) (warning): A line's total excluding tax (LineExtensionAmount) is its subtotal less its discounts plus its charges: … in line …, not ….
- [XV-MY-32](https://xmlvalid.com/rules/XV-MY-32.md) (warning): A line's tax amount is the sum of its tax amounts per tax type: … in line …, not ….
- [XV-MY-33](https://xmlvalid.com/rules/XV-MY-33.md) (error): The tax scheme (cac:TaxCategory/cac:TaxScheme/cbc:ID) is OTH, with schemeID UN/ECE 5153 and schemeAgencyID 6, not ….
- [XV-MY-34](https://xmlvalid.com/rules/XV-MY-34.md) (error): A tax exemption (tax type E) needs its details: cac:TaxCategory/cbc:TaxExemptionReason, up to 300 characters, such as the exemption under the Sales Tax (Persons Exempted from Payment of Tax) Order.
- [XV-MY-35](https://xmlvalid.com/rules/XV-MY-35.md) (warning): The total net amount (LineExtensionAmount) is the sum of the lines' totals excluding tax: …, not ….
- [XV-MY-36](https://xmlvalid.com/rules/XV-MY-36.md) (warning): The total discount value (AllowanceTotalAmount) is the sum of the invoice's additional discounts: …, not ….
- [XV-MY-37](https://xmlvalid.com/rules/XV-MY-37.md) (warning): The total fee or charge amount (ChargeTotalAmount) is the sum of the invoice's additional fees: …, not ….
- [XV-MY-38](https://xmlvalid.com/rules/XV-MY-38.md) (warning): The total excluding tax (TaxExclusiveAmount) is the total net amount less the total discount plus the total charges: …, not ….
- [XV-MY-39](https://xmlvalid.com/rules/XV-MY-39.md) (warning): The total including tax (TaxInclusiveAmount) is the total excluding tax plus the total tax amount: …, not ….
- [XV-MY-40](https://xmlvalid.com/rules/XV-MY-40.md) (warning): The total payable amount (PayableAmount) is the total including tax less the prepayment plus the rounding amount: …, not ….
- [XV-MY-41](https://xmlvalid.com/rules/XV-MY-41.md) (warning): The total tax amount is the sum of the tax amounts per tax type: …, not ….
- [XV-MY-42](https://xmlvalid.com/rules/XV-MY-42.md) (warning): The tax amount of a tax type is the sum of the lines' tax amounts of that type: … for tax type …, not ….
