I'm going crazy! My code is a little too much to post here, but the problem is simple: if I decorate a field of my model, the editing form doesn't fire anymore (i.e. clicking the submit button, nothing happens).
I can post, here, the remote validation declaration and function:
[Required]
[Remote("CheckNomeAssociazione", "Associazioni")]
public string Nome { get; set; }
and this is the function:
public JsonResult CheckNomeAssociazione(string Nome)
{
return Json(true, JsonRequestBehavior.AllowGet);
}
If I comment the '[Remote...' row, the code is perfect. If I let it in place, the application steps into the remote validator, but doesn't do anything else. Anyone having same or similar problem? Thanks in advance Andrea
I think I've spotted the cause of this issue. We'd upgraded our jQuery to 1.5. It seems to break the Remote validation routines. Reverting back to 1.4.4 resolved our issues and the Remote validator started working properly again.
This post goes into a little more detail: jQuery Validate 1.7 breaks $.getJSON() on jQuery 1.5?
This may be a little late, but just as an update, this is no longer an issue in jQuery Validate 1.8. It no longer breaks
$.getJSON()
, even the latest (as of this post jQuery 1.5.2) works.try to put this:
Hope it helps