Forums

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

Can we add formatting to error message in groovy script

Swapnil Srivastav
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 17, 2024

Can we add formatting like adding line breaks, making text bold in an error message thrown from a custom validator script? Error is thrown on a JSM Portal from Create transition

ScriptRunner version: 8.3.0

2 answers

0 votes
Laurie Sciutti
Community Champion
January 17, 2024

Hi @Swapnil Srivastav and welcome to the Community!  Maybe this will help?

0 votes
PD Sheehan
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 17, 2024

I don't think you can do that with a validator script.

But it should be possible with a behaviours validation. The "setError" and "setHelpText" methods accept plain HTML.

This has the added bonus of flagging the error immediately upon entry rather than waiting for the user to click submit.

Suggest an answer

Log in or Sign up to answer