- Knowledgebase
- XML Schema
- Cvc-datatype-valid
-
Glossary
-
XML / ISO 20022 Standard
-
ISO 20022 Messages
-
XML Schema
- Miscellaneous
- Attribute
- Closing Tag
- Comment
- Content
- Cvc-complex-type
- Cvc-elt
- Cvc-id
- Cvc-identity-constraint
- Cvc-minexclusive-valid
- Cvc-mininclusive-valid
- Cvc-type
- Cvc-totaldigits-valid
- Cvc-attribute
- Cvc-datatype-valid
- Maximum Length
- Cvc-enumeration-valid
- Cvc-fractiondigits-valid
- Cvc-length-valid
- Cvc-maxexclusive-valid
- Cvc-maxinclusive-valid
- Cvc-maxlength-valid
- Cvc-minlength-valid
- Cvc-pattern-valid
- Element Value
- Encoding
- Length
- Mandatory element
- Missing
- Missing Tag
- Missing Child Element
- MIXD
- Root
- Unsupported Characters
- UTF-8
- Value
- Wrong Declaration
-
EPC SEPA
-
CGI-MP
-
US ACH (Nacha)
-
SWIFT MT
-
Finvoice
-
Bank-Specific
-
XMLdation Service Guides
-
Studio Guide
-
Simulator
cvc-datatype-valid.1.2.1
Notice! This page describes the nature of the error using a hypothetical example and not the erroneous data of the input test file. You should however be able to apply this information to your error case.
General description of the error:
The format of the error message: cvc-datatype-valid.1.2.1: ''{0}'' is not a valid value for ''{1}''.
Error description in schema standard: http://www.w3.org/TR/2006/WD-xmlschema11-2-20060217/datatypes.html#cvc-datatype-valid
Possible causes for this error:
- Field value is not the type which is defined for the element. For example:
- Text value is used when field type is defined as decimal.
- Date format given for date/dateTime types (e.g. ReqdExctnDt/CreDtTm) is invalid, thus trigger a schema validation error
Example 1
<CtrlSum>s</CtrlSum>
Error message: Error cvc-datatype-valid.1.2.1: 's' is not a valid value for 'decimal'
How to fix: In this example a correct type value should be used by replacing text value with a decimal value.
<CtrlSum>100</CtrlSum>
Example 2
<ReqdExctnDt>2019-11-40</ReqdExctnDt>
Error message: ReqdExctnDt' value '2019-11-40' is not valid.
How to fix: Verifying date format is correct. Schema validation is checking that date is realistic, so error may be given if the given date is not possible in addtition to date format being incorrect (e.g. not containing dashes to separate years, days and months)
<CtrlSum>2019-11-20</CtrlSum>
Examples of valid dates and dateTimes
Valid formats for xs:date are yyyy-mm-dd;
2020-01-30
Valid formats for xs:dateTime are similar to as for date but with time suffix, e.g.
2002-05-30T09:00:00
2002-05-30T09:30:10.5
2002-05-30T09:30:10Z
2002-05-30T09:30:10+06:00