In List Validator

Specification

{
  "validatorType": String,
  "name": String,
  "description": String,
  "fields": FieldSelectorSpec,
  "validValues": Array[String],
  "isNot": Boolean,
  "onNullResult": String,
  "castFields": Boolean
}

Structure Values

Field Name

Type

Description

Required

Default

validatorType

String

The type of validator to construct

Required

name

String

The name of the validator. Must be unique within the validation suite.

Required


description

String

Expanded validator information.


None

fields

Object

A Field Selector Spec

Required

validValues

Array[String]

An array of values to pass to the SQL IN statement.

Required

isNot

Boolean

Flag for whether to use not in the where clause

false

onNullResult

String

A value of pass, null, or fail that describes how to process null values. Null aggregates them into a null column. Pass aggregates them in with the other passing values. Fail aggregates them in with the other failing values.

null

castFields

Boolean

Specifies if target fields should be cast to a string prior to validation.

false

Example

{
  "validatorType": "inList",
  "name": "sample_inList_validator",
  "description": "I can check enumerated values",
  "fields": {
    "fieldSelectorType": "Single",
    "fieldName": "col_name"
  },
  "validValues": ["1", "2", "3"],
  "isNot": true,
  "onNullResult": "pass",
  "castFields": false
}



Was this article helpful?
0 out of 0 found this helpful