Question: I have a wizard style page that I want to validate a page at a time. So before the user can move off the (partial) page I submit the inputs from the div for validation. Client side validation works OK but on some pages there are one or more fields I need to validate on the server. Yes I know about remote validation.

I can get the server side validation done without a problem. The issue I have is how do I display the errors on the correct fields? I can locate the fields in the div and find the span where the error message is suppose to go. But I just can't get the message to display.

I must be missing something when updating the field span. I would have thouht that there is a jQuery routine to add error information to a field. I need something similar to the controllers AddModuleError. So when I get return from my $.Post I can set error text on the appropriate fields.

Any suggestions?

Answer: 
A potential solution to your problem might be in this article "[Client side validation after Ajax Partial View result in ASP.NET MVC 3](http://itmeze.com/2010/10/08/client-side-validation-after-ajax-partial-view-result-in-asp-net-mvc-3/)"

Basically, once you get your html from the post you can invoke validation using jQuery.validator.unobtrusive.parse()

As per the example in the article;

```
   $.post("YourAction", { data: <your form data> },
  function(htmlContent){
    $('#container').html(htmlContent);
    jQuery.validator.unobtrusive.parse('#content')
  }

```

Worth looking into
If you are using the included RemoteAttribute, or the version I linked to in my answer to [your other remote validation question](https://stackoverflow.com/questions/7328605/mvc3-razor-remote-validation-controller-arguement-is-always-empty), then you should not have to worry about displaying the error, as both work with the `ValidationMessage` helpers to automatically display errors. 

Have you added `Html.ValidationMessage(...)` or `Html.ValidationMessageFor(...)` for each field to be validated?