Date time string with format attribute 205 shall be YYYYMMDDHHMMSS.
The content of udt:DateTimeString does not match the tested pattern for year, month, day, hour and minute. The message text, however, specifies the YYYYMMDDHHMMSS format; the test actually checks a 12-digit pattern without seconds.
According to the message, format identifier 205 denotes a date and time value. The discrepancy between the specified format with seconds and the tested pattern is significant because the check rejects values that include seconds.
The value in udt:DateTimeString does not match the numeric pattern expected by this check. Note that the check’s pattern differs from the format with seconds stated in the message text.
- Check the content of
udt:DateTimeStringwithformat="205". - Compare the value with the tested pattern, which expects 12 digits for the year, month, day, hour and minute.
- Take into account that the message text also requires seconds, unlike the current test.
- Generate the invoice again and validate it once more.
<udt:DateTimeString format="205">20240131123045</udt:DateTimeString>
<udt:DateTimeString format="205">202401311230</udt:DateTimeString>
Technical details
The test uses matches() with a regular expression that permits surrounding whitespace and checks month, day, hour and minute using digit ranges. The expression has no seconds group and does not validate the calendar day for the given month.
The rule applies to udt:DateTimeString elements with the attribute format="205".
rule/@context)assert/@test)