Regex: Create and configure Regular Expression custom field
Last updated
Last updated
Regex custom field is used to validate the values entered into the field - it can be used on the create issue screen and also on the customer portal.
Regex custom field is only a text field.
To create a Regex custom field, you need to have global permissions.
Go to the Issues in global settings and to the Custom Fields section.
Create a new custom field and find it in the Advanced section "Regex".
Associate custom fields with the projects and screens you need.
This custom field works with every kind of project.
In the already created custom field, choose Context -> Create, edit, or delete contexts -> Edit custom field config.
Now, let's configure Regex values. Use Templates or enter your pattern. Examples of use are here.
Define an error message that will be displayed when a user enters an incorrect data format. If the field remains empty, a default message will be: "Enter a value that will be validated for the configured regular expression: [regex_pattern]."
At the bottom, there is a testing area where you can run a data validation test. We always recommend running a test.
Save the field.
a) Company-managed project
To add a custom field in a company-managed project, you can do it from the custom field level with Screens and context and then add or remove the associated screen.
You can get the same result by adding a custom field to the list in Screens options on the left menu in Issue global settings.
⚠️ To add a custom field to the company-managed project, you must be a global admin.
b) Team-managed project
In a team-managed project, go to the project settings -> issue types -> Search for field -> and add a custom field where needed.
⚠️ You can do it as project admin.
Template title
Description
Credit card validator (Mastercard)
Example: 2222 4053 4324 8877
Date format
Example: 12/07/2024
Email address
Example: contact@appsvio.com
HEX color
Example: #F5007E
IBAN
Example: DE89 3704 0044 0532 0130 00
IPv6
Example: 2001:0000:130F:0000:0000:09C0:876A:130B
LinkedIn profile
Example: linkedin.com/in/john-doe/
MAC address
Example: 00:B0:D0:63:C2:26
Name and surname
Example: John Doe
SWIFT code
Example: AAAA-BB-CC-123
US Phone number
Example: +1-212-456-7890
US Postal code
Example: 33138
USD currency
Example: $350.75