1099 Reporting

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.

If you see the following message, the IRS will reject the file because it doesn't meet their schema requirements: "This file will be rejected by the IRS due to XML schema validation errors. Download the _ERROR_MESSAGE file from the File Manager for details."

Find and correct the errors before regenerating the file.

  1. Go to the File Manager page and select two files: the XML transmittal file and the text file ending in _ERROR_MESSAGE, then click the Download icon.
    The files are at the top of the list. To narrow the list, click Transmittal files.The File Manager menu item, the selected transmittal files, and the Download icon are highlighted.
  2. Open the _ERROR_MESSAGE text file and read the error message.

    Each error message follows this format: line: 159, column: 54, error message: cvc-type.3.1.3: The value '' of element 'n1:AddressLine1Txt' is not valid.

    Part of error message Description
    line: 159 The line number in the XML file where the error occurs. Use this to find the record with the error in your XML file.
    Tip:

    This is the number of the line in the XML file where the error occurs (not a line in your data). A single recipient record spans multiple lines, so one recipient with missing data may generate several errors with nearby line numbers.

    column: 54 The character position within that line. You can ignore this.
    cvc-type.3.1.3 / cvc-datatype-valid.1.2.1 / etc. The technical XML schema rule that was violated. Ignore this code and focus on the rest of the message.
    The value '' of element 'n1:AddressLine1Txt' is not valid. This shows which field has the problem and what value (if any) was submitted. A pair of empty single quotes ('') means the field was left blank.
  3. Open the XML file in a text editor, such as Notepad, Notepad++, or VS Code, and use the line number from the error messages to find the records with errors.
    The element name in the error message (after the colon, like AddressLine1Txt) tells you which field needs to be corrected:
    XML element name 1042-S form field
    n1:EIN Employer Identification Number (EIN)
    n1:BusinessNameLine1Txt Recipient Business Name
    n1:AddressLine1Txt Recipient Street Address (Line 1)
    n1:CityNm Recipient City
    n1:StateAbbreviationCd Recipient State
    n1:ZIPCd Recipient ZIP Code
    n1:CountryCd Recipient Country Code
    n1:TaxRt Tax Rate
    n1:Chapter3StatusCd Chapter 3 Status Code
    n1:Chapter4StatusCd Chapter 4 Status Code
  4. Correct the records with errors in your data source: either your import file or the Payers, Recipients, or Forms pages in the software.
    Go to the common XML errors section for specific correction guidance.
  5. Generate and submit a new original transmittal file.
    Note:

    If you receive the warning message again, repeat these steps until you resolve all the errors.

Common XML errors

Empty required fields

Missing required fields are the most common cause of errors. The error message shows empty single quotes ('') to indicate the value is missing: The value '' of element 'n1:TaxRt' is not valid. Complete the required fields according to the following requirements to correct the errors.
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.