Forums

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

Validate Number field with Regex

Ingo Förster January 8, 2024

I use a regex validator inside a transition to check:

Value is positive Integer

/^\d+$/

The problem I have is that Jira returns always 100.0 from a number field and not 100.  But float/double is what I do not want allow.  How to forbid something that Jira will do natural?

1 answer

0 votes
Mayuresh Kamble
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 8, 2024

Hi @Ingo Förster 

Welcome to the community!

Could you please try this regex:  (^?\d+)$ and let me know if it works for you.

Regards,
Mayuresh

Ingo Förster January 8, 2024

This allow negative numbers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events