ppp
ppp

Reputation: 11

what if i do not set error message in required field validator?

If i do not set error message in required field validator, will it display msg pop up box or not? my code-

<asp:RequiredFieldValidator runat="server" SetFocusOnError="true" 
  ValidationGroup="Search" ID="RFV_ddlTimeSlot" Display="None" 
  ControlToValidate="ddlTimeSlot" InitialValue="--Select Time Slot--"
  ErrorMessage=""></asp:RequiredFieldValidator>

Upvotes: 1

Views: 437

Answers (3)

m.edmondson
m.edmondson

Reputation: 30872

Yes it will still validate. Why not spend 5 mins trying it out?

Upvotes: 2

Sidharth Panwar
Sidharth Panwar

Reputation: 4654

Whenver your control have invalid values and validation occurs your RequiredFieldValidator will show a *****.

Upvotes: 1

Azhar
Azhar

Reputation: 20670

So it will still validate the control but will not show any message.

Upvotes: 1

Related Questions