Hi Team,
We would like to validate the numeric value like 50000 or 201203, etc on the single-line text field. I tried to use a "Simple scripted validator" in workflow validator and applied the below condition. It's working, but we do not want this field as mandatory. It's validating the field, but it's not allowing to create of the ticket without entering the value. Is there any option to make this field validation without mandatory?
cfValues[
'Cost at Approval'
] ==~ /^[
0
-
9
]*$/
Hi @Lakshmi CH ,
Using JMWE's Scripted Validator, you can use this script:
!issue.get("Cost at Approval") || issue.get("Cost at Approval") ==~ /^\d+$/
Thank you @David Fischer Its working as expected.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi @Lakshmi CH
could you please try with this expression
/^[0-9]{0-n}$/
it allows for empty value.
it should normally work on Cloud version but I didn't test it on the server version.
Let me know how it went for you.
Cheers,
Karim
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.