Incorrect or inconsistent data entry can slow down workflows, create automation failures, and require manual corrections. Regex Field Validation in Smart Forms for Jira helps enforce structured data input, ensuring that users provide information in the correct format before submitting a form.
This guide walks through how to set up regex validation, where to apply it, and practical regex examples to keep your Jira data clean and usable.
When users enter email addresses, IDs, or filenames, incorrect formatting can cause issues later. Regex validation allows you to set clear rules so that only correctly formatted inputs are accepted.
Steps to apply regex validation:
Examples of useful regex patterns:
Email Format Validation:
^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$
Ensures a valid email format (e.g., user@example.com).
Restricting File Uploads to PDFs:
/\.pdf$/i
Allows only PDF file uploads.
You can also set minimum and maximum character limits for text fields.
Default error messages:
For fields where users select multiple options, you can prevent too many or too few choices.
Steps to apply validation:
Default error messages:
For fields that collect prices, IDs, or quantities, setting a minimum and maximum range ensures values remain within acceptable limits.
Steps to apply validation:
Default error messages:
🚫 If the input doesn’t match the regex pattern, the form will:
^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$
✅ Ensures users enter a properly formatted email (e.g., user@example.com).
^\+?[1-9]\d{1,14}$
✅ Supports E.164 international phone number format (e.g., +1234567890).
^\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}$
✅ Accepts US phone numbers with or without separators (e.g., (123) 456-7890).
^\d{5}(-\d{4})?$
✅ Matches 5-digit ZIP codes with an optional 4-digit extension (e.g., 12345 or 12345-6789).
^[A-Z]+-\d+$
✅ Ensures inputs follow Jira issue key format (e.g., DEV-123).
^INV-\d{6}$
✅ Ensures a consistent invoice numbering format (e.g., INV-202345).
^\d{3}-\d{2}-\d{4}$
✅ Matches SSN format (e.g., 123-45-6789).
^\d{2}-\d{7}$
✅ Ensures Tax ID formatting compliance (e.g., 12-3456789).
By implementing Regex Field Validation effectively, teams can reduce errors, improve automation workflows, and maintain cleaner data in Jira.
Olha Yevdokymova_SaaSJet
Product Marketing Manager
SaaSJet
Ukraine
10 accepted answers
0 comments