¿Por qué aparece ValidationSummary aunque ModelState es válido?

I have a view with @Html.ValidationSummary("Please check the following errors:") at the top of a form. The text "Please check the following errors:" is Siempre hay rendered, whether or not the model state is valid (I have verified the model state both in the view and in the controller).

Can anyone point me to why this is happening? I feel like I'm missing something pretty basic here - but I'm stumped!

preguntado el 27 de agosto de 11 a las 20:08

1 Respuestas

Uh - I just realised why. It was because I'd removed the default styles for the validation summary! Adding this back in solved my issue:

    display: none;


Respondido 28 ago 11, 10:08

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.