views:

16

answers:

0

Hi,

I have html validation using client side and server side validation.

The problem is when I open the page the validation text is visible before I fill in the text box and post the form. What can I do the solve this issue?

I'm using the following code:

<script src="/Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
<script src="/Scripts/jquery.validate.js" type="text/javascript"></script>
<script src="/Scripts/MicrosoftMvcJQueryValidation.js" type="text/javascript"></script>

<% Html.EnableClientValidation(); %>
<% using (Html.BeginForm()) {%>

<%=Html.TextBox("Email", null, new { style = "width:190px;Border:0px", maxsize = 190 })%>

<%=Html.ValidationMessage("SingMeUp", "Invalid e-mail address.", new { @class = "Email_Validation_Error_Location_OverLoad", style = "float:left" })%>