• demo42
  • NEWBIE
  • 5 Points
  • Member since 2012

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

I have a bit of markup that displays a pulldown menu for an apex variable, and the field is required.

 

The markup looks like this:

 

                       <apex:pageBlockSectionItem >
                           <apex:outputLabel value="Select Territory" for="territory"/>
                           <apex:outputPanel layout="block" styleClass="requiredInput">
                               <apex:outputPanel layout="block" styleClass="requiredBlock"/>
                               <apex:actionRegion>
                               <apex:selectList value="{!theTerritoryUtility.territoryId}" 
                                                id="territory" 
                                                size="1"
                                                required="True">
                                   <apex:selectOptions value="{!theTerritoryUtility.territoryOptions}"/>
                                   <apex:actionSupport event="onchange" 
                                                       rerender="leadDelegation"/>
                               </apex:selectList>
                               </apex:actionRegion>
                           </apex:outputPanel>
                       </apex:pageBlockSectionItem>

 

 

And when the user tries to save without entering a value, the error message looks like this:

 

thePage:theForm:thePageBlock:leadDelegation:j_id368:territory: Validation Error: Value is required.

 

Is there something I can do to make the error message less ugly?