Power Scripts - Line break in a validator message Edited



I want my SIL validator to return a following message:

"Following fields cannot be empty:
* Field1
* Field2"


However, when validator returns above message, it removes all line breaks and condenses everything to a single-line sentence.:

"Following fields cannot be empty:* Field1* Field2"

I've tried all the nice and nasty tricks that came to my mind, and none of these worked:

* putting \n instead of normal line breaks

* putting \\\\

* putting <br>

putting &#13;&#10;

* returning array of strings instead of a single string


Is there any workaround to achieve a multiline validator message through SIL?

2 answers

1 accepted

1 vote
Accepted answer


Kindly try \n


I mistyped slashes here, but of course in the code I've tried "\n" (already corrected above).

On screen it was just removed from message, but didn't cause it to break into new line.

I just made some research. You will not be able to do it because the message is escaped in Jira's vm template.

Dang, Wish I could escape escaping by injecting code in right format:) Anyway, thanks for the effort and finding a source of the problem!

I always typing “\r\n” (without quotes) for line breaks with sil or JavaScript 

Good hint:) Unfortunately not working in validation message.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

1,172 views 5 10
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you