Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Use RegEx to restrict data in Custom label field

Vishal Biyani
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.
January 19, 2021

I have created a custom Label field. If I want to restrict users to be able to add data that matches certain pattern, is that possible without going to any plugin?

e.g. Strings matching the pattern ABC-\d\d\d or DEF-\d\d\d\d\d\d should only be allowed in the custom label field.

I am using premium cloud version.

1 answer

1 accepted

1 vote
Answer accepted
Mohamed Benziane
Community Champion
January 20, 2021

Hello @Vishal Biyani 

You can't restrict label field out of the box. A label field is made to allow users to put whatever data they want/need. You can try to use a customfield with restricted option instead.

 

Hope this helps

Vishal Biyani
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.
January 20, 2021

@Moh - i have created a custom field of type Label. Any suggestions how to restrict data in this field using RegEx?

Nic Brough -Adaptavist-
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.
January 20, 2021

No, as that defeats the purpose of the label field.  Use a multi-select custom field instead, then you can completely control what people put in.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events