function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Shifs SalheenShifs Salheen 

Custom error messages for dropdown component

Hi everyone,
I have a field which is of text field type,but on visualforce page I am creating it as dropdown using <apex:selectList> .Due to this I am unable to attach required error message to it .Is there any solution to it?
can you use <apex:pageMesssages/> tag, this will display the error message at the top of the page.
I'm not sure how you are expecting it.
Shifs SalheenShifs Salheen
Actually <apex:pageMesssages/> will show error messages at the top of the screen.But I needed along with the component .I figured it out.Created an error block and applied styling same as <apex:messages> and then rendered it conditionally.