In my form I need to validate a field for both required and for range.
The problem is that if the second validation control message is pushed far to the left, because of the 1st validation control message. The code looks like this:
<asp:TextBox ID="txtClass" Width="80px" runat="server"></asp:TextB
<asp:RangeValidator ID="RangeValidator1" runat="server" ErrorMessage="Enter a valid year." ControlToValidate="txtClas
s" MaximumValue="2200" MinimumValue="1800" SetFocusOnError="True" Visible="True" Display="Static"></asp:Ran
4" runat="server" ErrorMessage="Enter a valid graduation date." ControlToValidate="txtClas
And if no value is entered the error message appears far off to the left, like this
TEXT FIELD Enter a graduation date
This appears to be because the first validation control is still taking up space even when not visible.
Does anyone know a work around for this problem?
Example page is here: http://www.glowfishtw.com/stlukes/alumni.aspx