I have created a input text field and want to make this field required and I did it through required attribute. I also want to put red vertical bar in front of text field which is required indicator in salesforce. I did follow code but red bar is not showing -
<div class="requiredInput">
<div class="requiredBlock"></div>
<apex:inputText value="{!name}" label="Name on Card" required="true"/>
</div>
How do I get the red bar to display?