Independent tool. Not affiliated with the U.S. Department of Labor or California DIR. Your workers' data never leaves your browser.

Certified Payroll Kit

Certified Payroll Kit › Guides › eCPR V2 upload errors

eCPR V2 upload errors and how to fix them

A V2 file can fail in three places: the schema check (the file's structure), DIR's upload step (your PWCR, project and settings), and review, where the file is valid but the numbers are wrong. Below are the messages you'll actually see for the common mistakes and what fixes each one. The schema messages were produced by validating test files against DIR's published V2 schema, the same way our free checker does.

Two free tools for this: the eCPR XML V2 checker validates any XML file against DIR's V2 schema plus the arithmetic DIR's schema can't check, and the generator builds the V2 file from a QuickBooks, Gusto, ADP or spreadsheet export. Both run in your browser; worker data isn't uploaded.

Find out which kind of failure you have

Schema errors and fixes

Messages are shortened: validators print the full namespace in braces before each element name, like {https://www.dir.ca.gov/Public-Works/CPR/eCPR-v2.xsd}contractorPWCR. Our checker shows it as CPR:contractorPWCR with the line number.

MessageCauseFix
contractorPWCR: The value 'NA' is not accepted by the pattern '[0-9]{10}'V1 allowed "NA"; V2 needs your 10-digit PWCR. Also shows for 9 digits or a number with spaces.Enter the 10-digit registration number from your DIR account, digits only.
version: The value '1.0' is not accepted by the pattern '2\.[0-9]+'A V1 template with a version element, or a typo.Set <CPR:version>2.0</CPR:version>.
contractorInfo: This element is not expected. Expected is ( version )The version element is missing.Add <CPR:version>2.0</CPR:version> as the first element.
contractorFEIN: This element is not expected.A field V2 removed is still in the file (also contractorLicense, projectName, projectLocation and others).Delete every element in the removed list.
name: This element is not expected. Expected is ( firstName )V1's single name element.Replace with firstName, lastName and optional middleName.
lastName: This element is not expected. Expected is ( firstName )Right elements, wrong order.Follow the V2 element order.
ssn: The value '111-22-3334' is not accepted by the pattern '[0-9]{9}|'Dashes or spaces in the SSN or ITIN.Nine digits only.
employeeLevel: The value 'Journeyman' is not accepted by the pattern 'journeyman|apprentice'Capital letters.Lowercase journeyman or apprentice. Same for true/false.
forWeekEnding: '11/08/2026' is not a valid value of the local atomic typeUS date format.Use YYYY-MM-DD: 2026-11-08. Same for every date.
fedTax: '$12.50' is not a valid value of the local atomic typeCurrency symbols or thousands separators in amounts.Plain numbers: 12.50.
hrsWorkedEachDay: Missing child element(s). Expected is ( day )Fewer than seven day elements.Seven days, ids 1–7, with 0.0 hours on days off.
eCPR: No matching global declaration available for the validation rootWrong namespace, usually the V1 one.Use xmlns:CPR="https://www.dir.ca.gov/Public-Works/CPR/eCPR-v2.xsd".

A file usually has several errors at once and validators may stop at the first in a block. Fix from the top, validate again, repeat.

Failures at DIR's upload step

These pass the schema and fail when DIR compares the file to its records or to what you selected:

Valid but wrong: what DIR's FAQ warns about

DIR's FAQ says schema validation checks structure, not accuracy, and DIR stores some fields without recalculating them. These are the problems it calls out, and what our checker flags for each:

ProblemHow to spot itFix
totalDeductions ≠ sum of deductionsAdd the eight deduction fields.Recalculate; leave travel and fringe out.
Gross pay in the rate fieldtotalHrlyPayRateStraightTime equals grossThisProject.Map the rate, not the pay total: base rate + fringe per hour.
Identical deductions for several workersSame breakdown on workers with different pay.Map deductions per employee; don't copy one worker's values.
Empty classification name<CPR:classification name="">Fill it. An empty name fails validation.
Classification shown as "Other"Seen in the draft preview.Use the names from your certified payroll records; DIR changes names it doesn't recognise to "Other".
Day 7 isn't the week endingDay ids and dates out of step.Day 1 = week ending minus six days … day 7 = week ending.
Hours don't add uptotHrs ≠ sum of days, or over 24 hours in one day across classifications.Recalculate totals from the daily values.

Fixing a rejected file

  1. Read DIR's reason. Note the reference number on the banner and open the Activity tab for the explanation.
  2. Validate the file locally. Load it in the V2 checker to get every schema error with line numbers, plus the arithmetic checks.
  3. Fix the source, not just the file. If the same mistake comes from your export or template, fix it there, or next week's file fails the same way.
  4. Validate again until it's clean. Errors hide behind earlier errors; repeat until there are none.
  5. Upload the corrected file. Use DIR's "Upload the corrected file" option, pick Schema Version 2.0, upload as a draft if under 250 employees, review, sign and submit.

Fixing a payroll already submitted

If a payroll was accepted and later found to be wrong, it's an amendment, not a re-upload. DIR's upload form asks "Amendment?"; DIR assigns the amendment number (it shows as "2-1" for the first amendment to payroll 2), so leave amendmentNum empty in the file. DIR's user guide notes the Amend option is available on the original run.

Questions

Why does my file say "This element is not expected"?

Either the element no longer exists in V2 (like contractorFEIN or projectName), or it's in the wrong position. The message usually says which element was expected instead.

What does "not accepted by the pattern [0-9]{10}" mean?

The value has to be exactly ten digits. It's almost always contractorPWCR: "NA", nine digits, or a number with spaces or dashes.

My file passed validation. Can it still be wrong?

Yes. DIR's FAQ says schema validation checks structure, not accuracy. Totals, rates and copied deductions can be wrong in a valid file, and DIR stores those fields without recalculating them.

Where do I see why DIR rejected my upload?

DIR's upload guide says a failed upload shows a banner with a reference number, and the Activity tab explains the problem. "Upload the corrected file" then pre-fills your previous selections.

Does the checker upload my file?

No. It validates against DIR's schema inside your browser. The file stays on your computer.

Official DIR documents used on this page

General information as of November 2026, not legal advice. DIR can update its documents; check the links above before relying on a detail.