Asp MVC unobtrusive Client Validation always returns true

We have a partial view that contains a form with unobtrusive customer verification.

If we load a partial view using Html.Action, validation is done on the client side.

If the user clicks on the link, we use jQuery to populate the div with a partial view, the client check always returns true.

Any idea what is going on?

+5
source share
1 answer

You need to parse the new html to include validation elements. You can do this using:

$.validator.unobtrusive.parse( $('.selector' ) );

, HTML. , .

+10

All Articles