Forums

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

How to validate a number field greater than 0

Markus_Landsiedler
Contributor
August 26, 2025

Hi,

I would like to add a validation for a number field which must be >0 in my workflow. If you want to change a transition or update the open issue and this field does not have a value which is greater than 0 it will come an error message.

How can I do this?

Thanks a lot for your answers.

BR, Markus

2 answers

2 accepted

1 vote
Answer accepted
Jaime Escribano _knowmad mood_
Atlassian Partner
August 26, 2025

Hi Markus :) 

 

My company created this plugin which greatly enhances workflow conditions, validators and post-functions.

Workflow Magic Box | Atlassian Marketplace

 

Using the "Field Conditional" you can choose to compare the value of a field, or even if the value of the field Is X given another field is Y.

 

Example: "If 'Expected costs' > 0 -> Then the field 'Approver' must not be empty".

 

You could also use the "regular expression validator" with a regular expression similar to 

^(?:(?:0?\.\d*[1-9]\d*)|(?:[1-9]\d*(?:\.\d+)?))$

which is supported OOTB, but it's not the best solution.

 

 

Let me know if I can help!

Markus_Landsiedler
Contributor
August 26, 2025

Hi @Jaime Escribano _knowmad mood_ ,

thanks for your answer.

I would not like to use another plugin, but thanks for the information :)

But I will try the regular expression validator too how it will works.

0 votes
Answer accepted
Marc - Devoteam
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.
August 26, 2025

HI @Markus_Landsiedler 

You can do this by the default ootb workflow conditions, you won't need a 3rd party app for this.

  • Compare Number Custom Field

  • Value Field

Or the default Regular Expression validator.

Markus_Landsiedler
Contributor
August 26, 2025

Hi @Marc - Devoteam ,

thanks for your answer! 

Is it also possible to add an error message if I will use the workflow conditions?

I do not have seen such a possibility.

I tried it also with the ScriptRunner. This is working fine. But my company will not use this AddOn anymore...

 

Marc - Devoteam
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.
August 27, 2025

Hi @Markus_Landsiedler 

No the ootb options don't have an option to provide an error message.

On transitioning the actor will receive the message that this is not possible, based on conditions not met, but a custom error message is not possible,

There is a related open feature for this, JRACLOUD-72299 

Markus_Landsiedler
Contributor
August 27, 2025

okay, I have feared that.

Thanks for information!

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