You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What type of custom field? Single line text? Number? Other?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In that case you can do:
issue.get("fieldId") ==~ /\d+\.\d\d€/
which forces to have at least one digit before the decimal point.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.