Forums

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

Regex Validation for Customfield

JayJuan Jones
Contributor
January 18, 2023 edited

Can someone give me some ideas on how to validate my custom field "Phone Number"? This is a text field, and it accepts integer values, but we are running into issues where some of our external help desk members are not capturing all 10 digits of the phone number. 

Any way I can validate the field upon issue create using regex? Should the field be updated to a Number Field instead of a text field? Any suggestions? 

Also tried to use the regex in this KB article and that didn't work. 

^[0-9]{n}$

1 answer

0 votes
Vamsi Kandala
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 18, 2023

Hi @JayJuan Jones

Are you trying validate for US number?

If so, can you try this?  This will accept phone numbers in the format of 123-456-7890 or (123) 456-7890.

(?\d{3}\)?[\s.-]\d{3}[\s.-]\d{4}$

Hope this helps.

Thanks,
Vamsi

JayJuan Jones
Contributor
January 18, 2023

hello @Vamsi Kandala I am trying to validate without the formatting so 1234567890

Vamsi Kandala
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 18, 2023

Hi @JayJuan Jones

Can you try this?

^[0-9]{10}$

Thanks,
Vamsi

Like • Els Bassant likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
atlassian, loom, loom for training, loom for teaching, video training, async learning, online education, screen recording, loom tutorials, loom use cases, atlassian learning, team training tools, instructional video, virtual training tools

🛗 Elevate Your Training and Enablement with Loom

Join us June 26, 11am PT for a webinar with Atlassian Champion Robert Hean & Loom’s Brittany Soinski. Hear tips, stories, and get your burning questions answered. Learn how Loom makes training and enablement easier. Don’t miss it!

Register today
AUG Leaders

Atlassian Community Events