0
I am using a registration form within a modal
, however when the condition of the ModelState.IsValid
is not satisfied with view
is returned. Only instead of returning the same view
before the action of submission of the form, it returns totally disfigured, containing only the view
registration. Follows the code of the view
criminal record:
[HttpPost]
public ActionResult Cadastrar(Pessoa pessoa)
{
if (ModelState.IsValid)
{
//código caso seja válido
}
return View(pessoa);
}
How to proceed to display errors in view
for the user?