I have a form containing different required field.
I also have a ValidationSummary
which will display a pop-up when clicking on the submit button if some required fields are not filled in.
<asp:ValidationSummary runat="server" ID="vsValidationSummary" ValidationGroup="DefaultGroup" DisplayMode="BulletList" ForeColor="Red" ShowMessageBox="true" ShowSummary="false" />
When filling all the fields except one (see below the field) the popup is displayed (OK) but with only the message :
- Required
For other fields there is the name next to "Required"
The field which is failing is the following :
<div class="formFieldLine">
<span class="userFormLabel">
<ab:FormLabel Colon="false" runat="server" AssociatedControlID="ddlSuperstructureType" Text="<%$ Resources:lbSuperstructureType.Text %>" />
</span>
<ab:LabelledDropDownlist ID="ddlSuperstructureType" runat="server" DataSourceID="dsSuperstructureTypes" DataTextField="Text" DataValueField="Value" CssClass="dropdownSTypeBuyBack" />
<asp:CustomValidator ID="cvSuperstructureType" runat="server" ControlToValidate="ddlSuperstructureType" ClientValidationFunction="ddlSelected_Validate" ValidationGroup="DefaultGroup"
CssClass="validatorMessage" ErrorMessage="<%$ Resources:Messages,RequiredField %>" OnServerValidate="ddlSelected_Validate"/>
<br />
</div>
Here is a working field
<div class="formFieldLine">
<span class="userFormLabel">
<ab:FormLabel Colon="false" runat="server" AssociatedControlID="tbLeasingDuration" Text="<%$ Resources:lblLeasingDuration.Text %>" />
</span>
<ab:LabelledTextBox ID="tbLeasingDuration" runat="server" MaxLength="100" />
<asp:RequiredFieldValidator ID="rvfLeasingDuration" ErrorMessage="<%$ Resources:Messages,RequiredField %>" ControlToValidate="tbLeasingDuration" runat="server" ValidationGroup="DefaultGroup" ForeColor="Red" />
<br />
<asp:RangeValidator ID="rvLeasingDuration" Type="Double" ErrorMessage="<%$ Resources:Messages,InvalidNumber %>" ControlToValidate="tbLeasingDuration" ValidationGroup="DefaultGroup" runat="server" MinimumValue="0" MaximumValue="999999999" ForeColor="Red" Display="Dynamic" style="margin-left : 212px;"/>
</div>