Home     About PeterBlum.com     Policies     Download a Licensed Product     Newsletter
Peter's Professional Validation
Required Field Markers

Required Field Markers are a common part of Web user interfaces to point out where a field requires an entry before validation has to complain that something is missing. The marker, usually a text or graphic element, resides nearby the data entry field and is always shown.

DES includes two controls to setup Required Field Markers, the marker itself and a description that appears on top of the page. In addition, each validator has a property to turn on the marker.


The first element shown is the RequiredFieldsDescription control. The validator to the right of the textbox has its ShowRequiredFieldMarker property set, revealing the RequiredFieldMarker control, even when the validator itself is not showing any error message.

Fields marked * require an entry.

ASP.NET Syntax for this demo

<des:RequiredFieldsDescription id=RequiredFieldsDescription1 runat="server"/>
<asp:TextBox id=TextBox1 runat="server"></asp:TextBox>
<des:RequiredTextValidator id=RequiredTextValidator1 runat="server" 
  ControlIDToEvaluate="TextBox1" ErrorMessage="This field is required" ShowRequiredFieldMarker="True">
      <des:TextErrorFormatter Display="Dynamic"></des:TextErrorFormatter>