I am currently in the proccess of setting up remote validation using MVC3 so that a user is alerted if their chosen username already exists. Everything is set up and working correctly appart from the most important part, the error message not being displayed. If I submit the form the error message is displayed as the the page is refreshed with the relevant model state error added.
Is there anyway to refresh the model validation summary with a Json result?
Sample code:
Web.config must contain this:
The view is like this:
This is the model being passed to the View:
This is in the controller
This will try appending numbers to the name until it finds an available username and will do something like this without doing a full postback: