Regex Validator

Specification

{
  "validatorType": String,
  "name": String,
  "description": String,
  "fields": FieldSelectorSpec,
  "pattern": String
}

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

pattern

String

A regex pattern. Must be escaped inside of a JSON block.

Required

Example

{
  "validatorType": "regex",
  "name": "sample_regex_validator",
  "description": "I can validate strings",
  "fields": {
    "fieldSelectorType": "SingleField",
    "fieldName": "col_name"
  },
  "pattern": "\\w{4}" // the backslash in "\w" must be escaped
}



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