You need to sign in to do that
Don't have an account?

How to set a rich text box as Required?
Hi,
i used <apex:inputTextarea richText="true" required="true" />
but i'm not getting any error message, if i clicked save button without any value in the text area.
but the other controle like
<apex:inputField required="true" value="{!account.BillingCountry}"/> workes fine.
how to set required field for rich text area??
Have you got an apex:pageMessages component on the page - I've found that I don't get the red marker to indicate the field is required, but when I have apex:pageMessages and click the save button I get the validation error (albeit in quite an ugly form).
All Answers
Have you got an apex:pageMessages component on the page - I've found that I don't get the red marker to indicate the field is required, but when I have apex:pageMessages and click the save button I get the validation error (albeit in quite an ugly form).
If you use any control other than <apex:inputfield> and set the required attribute to true. The required red sign will not appear. You need to put <apex:pageMessages> component on the page.
If you want to show the required sign as well please use the below code.
Please let me know if there is any issue.
Thanks,
Devendra Natani
Blog
Is that style classes are need to be write are default style values??
They are Salesforce style classes, so they should be present as long as your page isn't excluding the standardstylesheets
Then It is not working for me.
I'm getting the error message but not the red color bar.
You can try with Jquery also,
on click of submit/save button call the javascript method.
check if it is null then show the error message.
and to make your input field as required just like the salesforce std.
use the below css style sheet in your inputfield styleclass.
Thanks,
Sarv
Thank u i ll try and reply you ASAP.
I am not sure but just want to confirm. Have you written your code in below format? If yes then It will work.
Thanks,
Devendra Natani
yes.. i designed as same .