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
MohandaasMohandaas 

Make Selectlist field required

The 'required'  attribute in <apex:selectlist> tag is not functioning. Is there a way around to make it required?

 

<apex:pageBlockSectionItem id="placSecItem">             

<apex:outputLabel for="type">Contact Record Type</apex:outputLabel>             

<apex:selectList value="{!recordTypeId}" required="true" multiselect="false" id="type" size="1" onchange="changeRecordType()">               

<apex:selectOptions value="{!items}"/>             

</apex:selectList>             

</apex:pageBlockSectionItem>