I have a trigger which can return multiple errors using .adderror() method and i want to display them as separate lines.
So i have added new line characters like \n, \r\n, html br. All of these work when trigger returns the error to classic standard salesforce page.
But the above doesn't work on a lightning standard salesforce page.
Looks like lightning always ignores these characters. Another option is to use escape option in .adderror method {.adderror('error string', true)}, but i read in documentation that lightning always ignores this.
Is there any other alternative for this?