+ Start a Discussion
Shruthi GM 4Shruthi GM 4 

How to make dynamic multipicklist fields mandatory?

I have multi picklist field that which is not standard.It has been got through component.Now I need to make this multipicklist field mandatory on the vf page.I added "Required" keyword in the vf page which did not work actually.
Can anybody please help as how to make this mandatory.
Manohar kumarManohar kumar

Hi Shruthi,

You can add error when submitting the form. Pls make sure that you have put <apex:pageMessages > and rerendering that portion.

you can add error this way :: ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.ERROR,'error!!'));

Let me know if this does not work.

Thanks,

Manohar