I think chr(10) and <br> won't work in this case because i tried in my app. We can try some other way for this, error msg used <li> under <ul> tag in notification. so we can try to append one more <li> tag with the msg under <ul>. I tried it in my app and it works, I just placed the below code in page html header,
htmldbUlErr is class of <ul> tag.
but it will append your msg in all notification if you have some other validation on your page.
If possible try to use APEX_ERROR package and it's procedures for error handling. Please check the below link,
I have a raise_application_error message in my PLSQL code that displays in the notification area of the APEX page when raised. I would like to place a carrage return at specific points in the message. I've tried both chr(10) concatenations and adding '<br>' . Neither works. Any suggestions? It seems that the notification formating strips out HTML.
Not surprised that line feeds don't work (though it's probably possible using CSS
white-space: pre-line). In what way does
brnot work? (And what APEX version are you using?)
However, I doubt that white space or forced line breaks are the correct way to mark this up (unless the error messages are haiku). As mentioned above, lists are the correct way to do this. I have previously created multi-level validation error messages using nested lists in an APEX 3.0 app using (IIRC) the function returning error text option. I suggest you provide more information on the nature of the messages, and where and how the error is raised. preferably in the form of an example on apex.oracle.com.
Thanks for your suggestions. I've found the quick and easy solution.
Rather than RAISE_APPLICATION_ERROR(-20001,'Message...') use
p_message in varchar2,
p_additional_info in varchar2 default null,
p_display_location in varchar2 );
APEX_ERROR.ADD_ERROR renders HTML in the p_message while RAISE_APPLICATION_ERROR doesn't.
thanks Lakshmi and fac586