How to validate a custom field using Regular Expression in Jira cloud

Priya_ThirumalaiKrishnamoorth June 26, 2024

I have a custom field and it is not a mandatory field. If user enters a value into that custom field, then it has to match the regular expression format. If it does not match, then error needs to be thrown to the user. It can also be empty

Can you please let me know how to implement this?

I tried using validators - But this is not working since the field can also be empty and we are not required to throw any error message.

Automation - We cannot throw error message to user and hence cannot use this. 

Any other thought/suggestion is much appreciated.! 

 

1 answer

0 votes
Maciej Dudziak _Forgappify_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 26, 2024

Hi @Priya_ThirumalaiKrishnamoorth,

Did you try Regular Expression Check (Validator)? I think you should be able to use reqex in format:  

(format)?

The question mark will match 1 or none  formats

However, if you need a better validation message, you would need an app that provides a Jira expression-based validator. There are several options available on the Atlassian marketplace.

I am from Forgappify, and we developed Jira Expression Validator, which is part of the Workflow Building Blocks for Jira app. 

I answered a similar question here:

https://community.atlassian.com/t5/Jira-questions/Re-Custom-Field-with-only-Serial-Numbers/qaq-p/2691128/comment-id/1015490#M1015490

Priya ThirumalaiKrishnamoorth July 10, 2024

Thank you for the response.

Suggest an answer

Log in or Sign up to answer