Field Selector
Single Field Selector
Specification
{
"fieldSelectorType": "Single",
"fieldName": "<string>"
}
Structure values
| Field Name | Type | Description | Required | Default |
|---|---|---|---|---|
| fieldSelectorType | String | The type of field selector. Single for applying a validator to a single field referenced by name. | Required | |
| fieldName | String | The name of the field to select. | Required |
Example
{
"fieldSelectorType": "Single",
"fieldName": "username"
}
List Field Selector
Specification
{
"fieldSelectorType": "List",
"fieldNames": [<list<string>>]
}
Structure values
| Field Name | Type | Description | Required | Default |
|---|---|---|---|---|
| fieldSelectorType | String | The type of field selector. List for applying a validator to multiple fields referenced by name. | Required | |
| fieldNames | String | The names of the fields to select. | Required |
Example
{
"fieldSelectorType": "List",
"fieldNames": ["username", "user_email"]
}
Regex Field Selector
Specification
{
"fieldSelectorType": "Regex",
"pattern": "<string>"
}
Structure values
| Field Name | Type | Description | Required | Default |
|---|---|---|---|---|
| fieldSelectorType | String | The type of field selector. Regex for applying a validator to a multiple fields, selected by a regular expression match. | Required | |
| fieldName | String | A regex pattern that matches the name of any field to be selected. Special characters must be escaped using backslashes when included in a JSON spec. | Required |
Example
{
"fieldSelectorType": "Regex",
"fieldName": "^user.+$"
}