ValidationSummary Validation in a modal receive Json message

0

My application has a View Create that is opened via a modal and the Controller that was an ActionResult is a JsonResult returning then Json after the request [HttpPost] .

  

The Required DataAnnotations of fields work perfectly.

But in this change some validations of my old configuration, no longer work, being obligatory.

These messages were captures by:

@Html.ValidationSummary(true, "", new { @class = "text-danger" })

How do I get the ValidationSummary to capture the message that is sent via Json

Examples of the return sent by my Controller Create .

return Json(new { resultado = true, mensagem = "Cadastro realizado com sucesso!" });
    
asked by anonymous 05.03.2017 / 03:26

0 answers