Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

I am using JMWE and need this validation for cost entered. Format Example: xx.yy€. How can i do it?

I am using JMWE and need this validation for cost entered. Format Example: xx.yy€. How can i do it?
I need to validate the values entered and the symbol too.

1 answer

0 votes
David Fischer _Appfire_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Oct 27, 2023

Hi @Barkha Singh 

What is the field type of the field that contains the value to be validated?

Also, at what point do you need to validate the value? Issue creation? During a transition?

Finally, you specified Confluence Server as your platform, did you mean Jira Server?

It is a custom field and we need to validate the value during issue creation .
Yes , my bad its Jira server.

David Fischer _Appfire_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Oct 27, 2023

What type of custom field? Single line text? Number? Other?

Single line text 

David Fischer _Appfire_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Oct 27, 2023

Then you can use a Scripted (Groovy) Validator with a script like:

issue.get("fieldId") ==~ /\d\d\.\d\d€/

which will pass only if the text field contains a string that's exactly two digits, a decimal point, two digits and the € sign. You can use a more sophisticated regular expression of you want to accept different formats.  

Like Barkha Singh likes this

Thanks David. Will try it out

That works but in case i have to enter 245753.00 then do i need to give that many \d  or we have any other way to do it ?

David Fischer _Appfire_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Oct 30, 2023

In that case you can do:

issue.get("fieldId") ==~ /\d+\.\d\d€/

which forces to have at least one digit before the decimal point.  

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events