Ist there any way to modify the bold title of ApexPages.Message when created via code? enter image description here

I know that you can alter this when you construct the message via apex:pageMessage

  • 1
    Find out how you can identify that message (id of html element or does it use a certain CSS class) and then override the styling in your local CSS.
    – FrankZ
    Jul 9, 2014 at 12:45

2 Answers 2


You can use the third (less common) form of constructing a message:

new ApexPages.Message(ApexPages.severity, summary, detail);

Also, you'll need to make sure you're showing summary and detail information on the apex:pageMessages element (showDetail should be true).


If you are showing custom error message from controller on page using ApexPages.Message then you can use html bold tag i.e. in the message like this

new ApexPages.Message(ApexPages.Severity,'<b>Error: Invalid Input.</b>');

And on the page where you use tag you can use attribute "escape" like this

<apex:pageMessages escape="false"/>

I hope this answers your question.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .