Want to display custom error using script Runner validator

Pavan
Contributor
January 2, 2023

Hello Team,

I have created one script validator 
if script validator fails , i want to show custom error on the screen 
 Do not want to show this below message 
image.png

is there a way to acheive this thing ?

1 answer

1 accepted

2 votes
Answer accepted
Ismael Jimoh
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.
January 2, 2023

Hi Paven

This should already be the behaviour unless I’m misunderstanding what you expect.

Say you are transitioning an issue, if the validator fails on the transition screen the following error should be shown.

Pavan
Contributor
January 2, 2023

yes, you are right

But My script validator is validating one url , whether the url is existing or not 

and if URL does not exist , in that case I want to throw invalid URL on the screen but in this case only static message is appearing


Ismael Jimoh
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.
January 2, 2023

Hi Pavan,

Do you want to throw an invalid URL based on the entry to the field that is being validated or item that was validated?

Your current configuration just says show this message when an error occurs. 

For specific errors you want thrown from a script, I will suggest using the custom script option as described here.

This will ensure that you can also parse the value from the field you want with the error message.

Like Pavan likes this

Suggest an answer

Log in or Sign up to answer