Models

Document Validation

Properties

NameTypeRequiredDescription
resultvalid | invalid | not_supported | errorYesvalid: the document passed every rule that applies to it. invalid: at least one rule was violated; see errors. not_supported: no ruleset is available for this document type, so nothing was checked. error: the validation service could not be reached or its answer could not be read. Example: "valid". Values: valid, invalid, not_supported, error
errorsobject[]YesThe findings the validation produced. Empty when the document is valid, and also when the result is not_supported or error

errors properties

NameTypeRequiredDescription
ruleCodestring | nullNoThe identifier of the rule that was violated, for example an EN 16931 or Peppol BIS business rule code. Null for findings that come from something other than a coded rule, such as a schema error. Example: "PEPPOL-EN16931-R010"
errorMessagestringYesWhat the rule expected, in the words of the ruleset that raised it
errorLevelstringYesHow serious the finding is. Only findings the ruleset treats as errors make a document invalid. Example: "ERROR"
fieldNamestring | nullNoWhere in the document the finding applies, usually as an XPath. Null when the finding is not tied to one place
sourcestringNoWhich ruleset produced the finding, for example the syntax schema or a Peppol business rule set