Dyanamic client side validation

Posted by Noel on Stack Overflow See other posts from Stack Overflow or by Noel
Published on 2010-04-09T13:11:47Z Indexed on 2010/04/09 13:13 UTC
Read the original article Hit count: 523

Is anyone doing dyanamic client validation and if so how are you doing it.

I have a view where client side validation is enabled through jquery validator ( see below)

<script src="../../Scripts/jquery-1.3.2.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(); %>

This results in javascript code been generated on my page which calls validate when I click the submit button:

function __MVC_EnableClientValidation(validationContext) {
    ....
    theForm.validate(options);
}

If I want validation to occur when the onblur event occurs on a textbox how can i get this to work?

© Stack Overflow or respective owner

Related posts about asp.net-mvc

Related posts about asp.net-mvc-2