Fix XML schema validation errors
Learn how to find and resolve XML schema validation errors in your transmittal files before submitting them to the IRS.
Find and correct the errors before regenerating the file.
Common XML errors
Empty required fields
- Tax Rate - The value '' of element 'n1:TaxRt' is not valid.
- Every income record must have a tax rate. If withholding was 0%, enter 00.00 instead of leaving the field empty.
- Address Line 1 - The value '' of element 'n1:AddressLine1Txt' is not valid.
- The recipient's street address is required. It must contain only letters, numbers, hyphens (-), and slashes (/).
- City - The value '' of element 'n1:CityNm' is not valid.
- The recipient's city is required and must contain only letters and spaces.
- State - The value '' of element 'n1:StateAbbreviationCd' is not valid.
- Required for U.S. addresses. Must be a valid two-letter state or territory abbreviation (for example, CA, NY, PR).
- ZIP Code - The value '' of element 'n1:ZIPCd' is not valid.
- Required for U.S. addresses. Must be either five (ZIP) or nine digits (ZIP+4).
- EIN - The value '' of element 'n1:EIN' is not valid.
- The withholding agent's Employer Identification Number is required and must be exactly nine digits.
- Business Name - The value '' of element 'n1:BusinessNameLine1Txt' is not valid.
- Required if the recipient is an entity. Must contain only alphanumeric characters and these symbols: hash (#), hyphen (-), comma (,), apostrophe ('), and ampersand (&).
- Country Code - The value '' of element 'n1:CountryCd' is not valid.
- The recipient's country is required and must be a valid IRS-approved Federal Information Processing System (FIPS) code.
- Chapter 3 Status Code - The value '' of element 'n1:Chapter3StatusCd' is not valid.
- A chapter 3 status code is required and must be a valid two-digit code. Go to page 40 of the 1042-S form instructions for a list of codes.
- Chapter 4 Status Code - The value '' of element 'n1:Chapter4StatusCd' is not valid.
- A chapter 4 status code is required and must be a valid two-digit code. Go to page 41 of the 1042-S form instructions for a list of codes.
Other errors
- US country code - The value 'US' of element 'n1:CountryCd' is not valid.
-
The country code is not valid. The 1042-S IRIS schema uses Federal Information Processing System (FIPS) 10-4 country codes, not ISO 3166-1 alpha-2 codes.
The United States is coded as US in FIPS, but it's not a valid value for 1042-S recipients. The 1042-S form is for payments to foreign persons, so U.S. recipients shouldn't have a foreign country code and this field should be left blank.
- Foreign country code - The value 'AU' of element 'n1:CountryCd' is not valid.
-
The country code is not valid. The 1042-S IRIS schema uses Federal Information Processing System (FIPS) 10-4 country codes, not ISO 3166-1 alpha-2 codes.
Verify that the country code entered matches the IRS-approved FIPS code for that country. Common examples where ISO and FIPS codes differ include Australia (AU in ISO, AS in FIPS) and China (CN in ISO, CH in FIPS).Tip:
Go to the IRS website for a list of valid country codes.
- Invalid content was found starting with element 'MailingAddressGrp'. One of 'AdditionalTxt, GIIN, CountryCd' is expected.
-
The recipient's address structure is incorrect. This error occurs when a recipient record includes a U.S. mailing address block (MailingAddressGrp) but the schema at that position in the XML expects either a country code or supplemental fields.
This typically happens when:
-
A foreign recipient has been incorrectly set up with a U.S. domestic address structure rather than a foreign address.
-
The recipient's address type doesn't match their country.
Review the recipient record to make sure the address type matches the recipient's country. Foreign recipients must use the foreign address structure rather than a U.S. mailing address group.
-
- If Chapter 3 Exemption code is "04", and Recipient Country Code has a value, it must be a treaty country.
- Exemption code 04 indicates a tax treaty exemption. Verify that the recipient's country code corresponds to a country with an active U.S. tax treaty. A list of U.S. tax treaty countries is available on the IRS website.
- Recipient TIN must have a value if chapter 3 exemption code is "04" and Income type code is "16".
- When claiming a treaty exemption (code 04) on income type 16, the IRS requires the recipient's TIN. Enter the recipient's TIN for these records.
- Recipient Country Code must have a value unless Chapter 3 Status code is "09", "11", "12", "13", "21", "27", "28", "29", "30", "31", or "32".
- Recipients require a country code unless their chapter 3 status code is one of the following: 09, 11, 12, 13, 21, 27, 28, 29, 30, 31, or 32. Add a valid country code to the recipient record or verify that the chapter 3 status code is correct.
- If Business/Person Name and TIN in Form 1042S Recipient Detail have a value, they must match the IRS database.
- When both a name and a TIN are provided for a recipient, the IRS validates them against its records and rejects the transmittal if they don't match. Verify the recipient's name and TIN combination before filing.
