errorxsd

cvc-datatype-valid.1.2.1:Invoice field value does not match the required data format

A value in your invoice does not match the data format required by the XML Schema. This typically means a number, date, or other value is formatted incorrectly — for example, using a comma instead of a dot for decimals (1.234,56 instead of 1234.56), or a date in DD/MM/YYYY format instead of the required YYYY-MM-DD (ISO 8601).

Severity
Fatal
Rule set
xsd
Country
All EU
Fix type
AUTO-FIX
Confidence
75%
Category
formatting

Engine Classification

Parse the error message to identify the invalid value and target type, then normalize common formatting issues (decimal separator, date format, boolean)

Confidence: 75% · Applied automatically in pipeline

What is cvc-datatype-valid.1.2.1?

cvc-datatype-valid.1.2.1 is a fatal validation rule defined in the xsd specification. It validates the __from_error_message__ element in the UBL invoice XML.

When this rule fires, the invoice is non-compliant and will be rejected by Peppol access points and national validation services. The sending system receives a rejection response and the invoice does not reach the buyer.

Target path: __from_error_message__

Why This Error Matters

cvc-datatype-valid.1.2.1 is a hard failure. Invoices that trigger this rule are rejected at the access point and never reach the recipient. In Peppol networks, this means your sending system receives an MLR (Message Level Response) with a rejection status. The invoice must be corrected and re-sent, adding delay to your payment cycle.

Invoice Navigator can automatically correct this error in your pipeline. The fix is applied with full audit evidence, so your compliance trail remains intact.

Validator Behavior

  • ·Causes invoice rejection
  • ·Error returned: cvc-datatype-valid.1.2.1
  • ·Specification: xsd

How to Fix It

1.

Check the error details

The error message identifies the invalid value and what type was expected. For example: '1.234,56 is not a valid value for decimal' means the number uses continental formatting.

2.

Fix number formatting

Use dot (.) as decimal separator, no thousand separators: 1234.56, not 1.234,56 or 1,234.56.

3.

Fix date formatting

Use ISO 8601 format: YYYY-MM-DD (e.g., 2026-03-12), not DD/MM/YYYY or MM/DD/YYYY.

4.

Update software locale settings

If this error occurs consistently, check your invoicing software's locale and number format settings for XML export.

XML Example

Generic example based on the rule's target XPath. Your actual XML structure may differ.

Before
<!-- Triggers validation error -->
<__from_error_message__></__from_error_message__>
After
<!-- Corrected -->
<__from_error_message__>VALID_VALUE</__from_error_message__>

Technical Reference

XPath__from_error_message__
Specxsd
Operationnormalize
StrategyParse the error message to identify the invalid value and target type, then normalize common formatting issues (decimal separator, date format, boolean)

Common Causes

  • ·UK or continental number formatting with comma decimals (1.234,56)
  • ·Dates in DD/MM/YYYY instead of ISO 8601 YYYY-MM-DD
  • ·Thousand separators in numeric fields (1,234.56)
  • ·Boolean values as Yes/No instead of true/false
  • ·Currency amounts with locale-specific formatting

Seeing this in production? The API handles cvc-datatype-valid.1.2.1 automatically. See the fix response →

Commonly Seen In

Invoicing software using locale-dependent formatting for XML exportERP systems not converting to XML-standard formatsCustom invoice generators

Related Errors

Last updated: 12 March 2026

Share this guide:

Handle cvc-datatype-valid.1.2.1 Automatically in Your Pipeline

The compliance engine auto-remediates this error with controlled safety policies and evidence pack generation.