Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info

This function is available in version 5.0 and later.

Overview

Validation at import is configured in import.config. Validation is set up as rules, each rule having a few settings. Validation operates on specifications on presentations.

...

Validation option

Usage

Ignore

If value defined in target-value is encountered at import, this value will be ignored (considered NULL). No values will be imported, and any existing value will not be overwritten.

Replace

If value defined in target-value is encountered at import it will be replaced by the value in replace-value.

Exception

If value defined in target-value is encountered at import, import will stop with an exception.

Configuration

In import.config add the configuration needed. Sample configuration:

Code Block
languagexml
<Specifications>
  <!-- Ignore EAN codes with values "xxx" -->
  <SpecificationValidationConfig enabled="true" validation-option="Ignore">
    <target-value culture="en-GB" value="xxx" />
    <replace-value culture="en-GB" value="" />
    <specification-type-persistentidentity>EAN</specification-type-persistentidentity>
  </SpecificationValidationConfig>
  
  <!-- Replace country codes with values "pt-BR" with "pt" -->
  <SpecificationValidationConfig enabled="true" validation-option="Replace">
    <target-value culture="en-GB" value="pt-BR" />
    <replace-value culture="en-GB" value="pt" />
    <specification-type-persistentidentity>Country</specification-type-persistentidentity>
  </SpecificationValidationConfig>  
  
  <!-- Stop import if code "X" comes -->
  <SpecificationValidationConfig enabled="true" validation-option="Replace">
    <target-value culture="en-GB" value="X" />
    <replace-value culture="en-GB" value="" />
    <specification-type-persistentidentity>NLACode</specification-type-persistentidentity>
  </SpecificationValidationConfig> 
</Specifications>

Filter by label (Content by label)
validation import block values
showLabelsfalse
max5
spacescom.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@1ecd09
showSpacefalse
sortmodified
typeshowSpacepagefalse
reversetruelabels
typepage
cqllabel in ( "validation" , "values" , "import" , "block" ) and type = "page" and space = "ASKB"
labelsvalidation import block values
Page Properties
hiddentrue

Related issues