Allowed date format

Error FX-SCH-A-000416 Factur-X

Value of '@format' is not allowed.

Mandatory rule: As long as it is violated, the invoice is invalid and will be rejected by validators.
What is wrong

The value of the @format attribute on udt:DateTimeString is neither empty nor included in the code list used for this date field.

What the rule means

When provided, the format indicator must match a value allowed by the associated code list.

Please use an allowed format for the issue date

The format indicator on the issue date is not included in the associated code list. You can change the value or leave the attribute empty.

What to do
  1. Find udt:DateTimeString in the issue date.
  2. Check the value of @format against the code list for date formats.
  3. Use a value included in that list or leave @format empty.
  4. Generate the invoice again and validate it.
Technical details

The test accepts an empty resolved code value or a value from the enumeration for code list ID 3.

Where the rule applies

The rule checks the @format attribute of the udt:DateTimeString element for the document issue date.

Context (rule/@context)
/rsm:CrossIndustryInvoice/rsm:ExchangedDocument/ram:IssueDateTime/udt:DateTimeString
Test expression (assert/@test)
string-length($codeValue3)=0 or document('FACTUR-X_BASIC-WL_codedb.xml')/codedb/cl[@id=3]/enumeration[@value=$codeValue3]