CONFIG_VALIDATIONS
CONFIG_VALIDATIONS is a configuration package used to define and manage validation rules. It allows you to define commit message validations and enable or disable SQL mapping analysis features.
Commit message validation allows you to enforce formatting rules, such as requiring a ticket number or specific prefix, through regular expressions. Each rule includes a validation pattern, message, and mode of enforcement.
See also:
CONFIG_ISSUE_TRACK_SYSTEM - Configure linking to issue tracking system tickets.
Usage
To manage validation rules, open the CONFIG_VALIDATIONS package and navigate to the Validations tab. From there, you can add, modify, or remove validation rules as needed. Refer to the examples provided for guidance.
Alternatively, you can edit the package directly by using Show Editor, or by exporting the JSON file, editing it externally, and re-importing it into Designer. See the Contents section below for reference.
After saving changes, the CONFIG_VALIDATIONS package will contain uncommitted changes. To maintain change history, it is recommended to commit the package after editing.
Contents
Validation configuration
Validation configurations are managed within the JSON array block named validations
.
Key | Value type | Example | Description |
---|---|---|---|
validationId | String | 87259b16-28be-11eb-ad54-2bb3624824bb | The unique identifier of the validation. Can be generated with online tools, such as UUID Generator. |
validationName | String | COMMIT_MESSAGE_EACH_LINE_STARTS_WITH | The unique name of the validation. |
description | String | Commit message validation that checks if each new line of it starts with JIRA-. | Description of the validation. |
validationRule | String | (?s)(JIRA-)(.)* | Validation rule – Defines the logic applied during the validation process to determine whether the object under validation meets the required criteria. |
validationMessage | String | Each line of commit message must start with JIRA | If the validation fails, the validation message is used to describe the reason for the failure, typically for end-user guidance. For example, the message can be displayed in the UI below a form field to explain why the input is invalid. |
validationMode | String | ERROR | Specifies the validation mode. Supported values are:
|
validationType | String | COMMIT_MESSAGE | Specifies the validation type. Supported types:
|
Example: Validation configuration
"validations": [
...
{
"validationId": "0bfc9682-28bf-11eb-ad6f-fb56de3fff2a",
"validationName": "COMMIT_MESSAGE_STARTS_WITH_FULL_TICKET_NUMBER",
"description": "Example of commit message validation that checks if it starts with JIRA- and a ticket number (sequence of digits)",
"validationRule": "(?s)(JIRA-\\\\d{1,})(.)*",
"validationMessage": "Commit message must start with JIRA- and a ticket number consisting of at least 1 digit",
"validationMode": "ERROR",
"validationType": "COMMIT_MESSAGE"
},
...
]