Forums

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

How to validate number field using regular expression check ?

Vikrant Yadav
Community Champion
March 31, 2020

I want to validate number field using regular expression check so that user can't enter value 0.

 

I want users to enter greater than value 0. What expression do i need to put. 

1 answer

1 accepted

2 votes
Answer accepted
Dan Burton
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 10, 2021

If it's just an integer field, then the expression:

 

^[1-9]\d*$

 

should work

Jeff Pittman
Contributor
December 5, 2023

Dan, what is recommendation IF Jira keeps adding a .0 to the end of the integer.

 

Getting error message 1.0 does not match...  We only added the value of 1

Like Debbie likes this
Drew Lahl
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 26, 2024

@Jeff Pittman- Did you ever figure out the solution for the decimal that they force?

Suggest an answer

Log in or Sign up to answer