Learn about how to configure Validators for Dynamic Fields.
The Dynamic Forms feature of Extension for Jira Service Management lets you validate a field in more ways than just setting it as required.
By configuring Validators, you specify what information a customer needs to provide in a Dynamic Field. Without such information, the customer can’t submit a request.
The feature ensures that your service desk agents receive only accurate information so it is easier for them to resolve requests faster.
To submit a request, all validation rules must be fulfilled. Keep in mind that the fields hidden by conditions can’t be validated.
You can configure the following Validators:
Field type | Rule name | Description | Example value |
---|---|---|---|
All fields | is required | Field is required. | - |
Attachment | size less than (kb) | 1000 | - |
TextField/TextArea | at least x characters | Minimal number of characters that makes field required. | 10 |
TextField/TextArea | no more than x characters | Maximal number of characters that makes field required. | 20 |
NumberField | is integer | The value must be an integer. | 1 |
Labels/MultiCheckboxes/MultiSelect/Components/Fix Version/s/Affect Version/s | at least x values | The numeric value ‘x’ determines the minimum number of selected elements. | 1 |
Labels/MultiCheckboxes/MultiSelect/Components/Fix Version/s/Affect Version/s | no more than x values | The numeric value ‘x’ determines the maximum number of selected elements. | 5 |
TextField | is URL address | The value must be a URL. | https://deviniti.com |
TextField | is email | The value must be an email adress. | deviniti@deviniti.com |
NumberField | greater or equal x | The value must be equal to or greater than the number ‘x’. | 4 |
NumberField | less or equal x | The value must be equal to or less than the number ‘x’. | 2 |
Data Picker/Data Time Picker | is before request creation (+/- offset) | Earlier date than the value from Created Date +/- x minutes/hours/days/weeks/months/years | (Created date: 05 Apr 2019) + 3 days/“2019-04-05 12:00” |
Data Picker/Data Time Picker | is after request creation (+/- offset) | Later date than the value from Created Date +/- x minutes/hours/days/weeks/months/years | (Created date: 01 Apr 2019) + 3 days/“2019-04-05 12:00” |
Data Picker/Data Time Picker | is before | The date before defined value | 2019/04/02 |
Data Picker/Data Time Picker | is after | The date after defined value | 2019/04/02 |
URL field | contains | The value which is URL | https://deviniti.com |
Text field (single line) | contains | A single line of text | - |
Text field (multi-line) | contains | Multiple lines of text | - |
Assets | is required | Field is required. | - |
at least x objects | Minimal number of objects that makes field required. | 10 | |
no more than x objects | Maximal number of objects that makes field required. | 20 | |
Text field (single line) | must match regex pattern | A single line of text must match particular Regex pattern | - |
Text field (multi-line) | must match regex pattern | Multiple lines of text must match particular Regex pattern | - |
Bear in mind that in order to use Assets in Jira Service Management it’s required to upgrade to the Premium Plan and establish your connection with the Assets API. To learn more, navigate to the Connect to Assets API section.
As any change in a request type is automatically saved and visible on the Customer Portal, we recommend to keep request forms Hidden from portal while modifying them.
To configure a validator for a selected field:
The validator for the selected field is set. By raising a request, this field will be displayed if the validator is fulfilled.
To create Dynamic Forms with the use of Validators, it’s possible to set configuration that enables administrators to validate text fields for the Regex pattern matching.
Regular Expressions, which are also known as Regex, serve as expressions that define a search pattern in texts. They’re used for validation purposes.
By using the Extension for Jira Service Management app you can set Regex as field validator to ensure that texts introduced in Dynamic Fields match particular criteria and text patterns like phone numbers and IP addresses.
The Extension for Jira Service Management app follows regular expressions that are mentioned in the resource article.
To learn about configuring a validator using Regex, check the Quick Guide or follow the below steps:
You can configure Regex validators for Text Field (single line) and Text Field (multi-line).
The Regex validator for the selected field is set. By raising a request, the text input in this field will be validated. If the validation fails, users will see the adjusted message.
If you can’t find the answer you need in our documentation, raise a support request. Include as much information as possible to help our support team resolve your issue faster.