• ceptes software
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies

I'm trying to create a picklist using <apex:selectList>, populate it with my own selections, and require the field to contain a value. Here's my code:

 

 

<apex:selectList required="true" size="1" value="{!SDQA__c.Inspector_Stamp1__c}" > <apex:selectOption itemLabel="{!SDQA__c.Inspector_Stamp1__c}" itemValue="{!SDQA__c.Inspector_Stamp1__c}" /> <apex:selectOption itemLabel="{!$User.FirstName} {!$User.LastName}" itemValue="{!$User.FirstName} {!$User.LastName}" /> <apex:selectOption itemLabel="N/A" itemValue="N/A" /> </apex:selectList>

 

The first value defaults to whatever the field currently contains (which will initially be null). The other two options are either the users First Name+Last Name, or N/A. The problem is that even though I have required="true", there is no validation enforced on this field (The red "required" bar doesn't even show up beside it). Anybody have an idea as to why that is?