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
Alexey Matveev Community Champion Jan 02, 2018


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.

Alexey Matveev Community Champion Jan 04, 2018

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 Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,308 views 14 20
Join discussion

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot