Suppose I have the following RequiredFieldValidator control which
validates a TextBox:
<form id="form1" runat="server">
<asp:TextBox id="txtVal" runat="server"/>
<asp:RequiredFieldValidator id="reqVal" ControlToValidate="txtVal"
ErrorMessage="Please enter a value in the TextBox!" Display="Dynamic"
runat="server"/>
<asp:Button id="but1" Text="SUBMIT" runat="server"/>
</form>
Now IE6 has this auto-complete feature which drops-down a list of
similar values which were previously entered in the TextBox that
currently has the focus as & when some text is being typed in that
TextBox.
Suppose I type the text "466" (without the quotes) in the TextBox &
press the Tab key on the keyboard. Without submitting the Form, I shift
the focus back to the TextBox & delete the text i.e. make the TextBox
empty. Next when I press the Tab key again, the RequiredFieldValidator
promptly displays the error message.
Again without submitting the Form, I shift the focus back to the
TextBox & press 4 on the keyboard. IE's auto-complete feature
drops-down a list which lists 466. If I type "466" (again without the
quotes) manually from the keyboard & press the Tab key, the error
message, as expected, disappears but instead of manually typing 466, if
I populate the TextBox by clicking 466 from the auto-complete drop-down
list that IE shows & then press the Tab key, the error message still
remains as it is though the TextBox is no longer empty now; it has been
populated with 466.
Is this some sort of bug in the RequiredFieldValidator control?
Thanks,
Arpan