# HG changeset patch # User nelopauselli # Date 1314196206 10800 # Node ID 607384590bf889ba3e521682d1f182fe2e9fe40c # Parent beeb7fd09ae715f71c646de9cc703a2bbb712d38 Mejorando el mensaje de error que se muestra cuando hay un error de validaciĆ³n del lado del servidor diff -r beeb7fd09ae7 -r 607384590bf8 Agendas/trunk/src/Agendas.Web/Content/Site.css --- a/Agendas/trunk/src/Agendas.Web/Content/Site.css Wed Aug 24 10:52:44 2011 -0300 +++ b/Agendas/trunk/src/Agendas.Web/Content/Site.css Wed Aug 24 11:30:06 2011 -0300 @@ -278,6 +278,16 @@ color: #ff0000; } +.validation-summary-errors ul +{ + list-style-type:none; +} + +.validation-summary-errors li +{ + font-weight: normal; +} + .validation-summary-valid { display: none; diff -r beeb7fd09ae7 -r 607384590bf8 Agendas/trunk/src/Agendas.Web/Controllers/EventoController.cs --- a/Agendas/trunk/src/Agendas.Web/Controllers/EventoController.cs Wed Aug 24 10:52:44 2011 -0300 +++ b/Agendas/trunk/src/Agendas.Web/Controllers/EventoController.cs Wed Aug 24 11:30:06 2011 -0300 @@ -239,7 +239,7 @@ this.AddWarning(log.WarningMessage); return RedirectToAction("Index"); } - ModelState.AddModelError("error", r.ToString()); + ModelState.AddModelError(string.Empty, r.Message); } return actionresultOnFail.Invoke(model); } diff -r beeb7fd09ae7 -r 607384590bf8 Agendas/trunk/src/Agendas.Web/Views/Shared/DefaultEditor.cshtml --- a/Agendas/trunk/src/Agendas.Web/Views/Shared/DefaultEditor.cshtml Wed Aug 24 10:52:44 2011 -0300 +++ b/Agendas/trunk/src/Agendas.Web/Views/Shared/DefaultEditor.cshtml Wed Aug 24 11:30:06 2011 -0300 @@ -8,7 +8,7 @@ @using (Html.BeginForm()) { - @Html.ValidationSummary(true, @LayoutResources.ValidationSummaryDefault) + @Html.ValidationSummary(true)
@Html.GetLegendForModel()