Validation Summary is used to display the list error messages of a page at fixed one place. If it summarises all the error messages of a page and shows them at once after the submit button is clicked and page is validated.  MVC have provided the helper class display a summary of all validation errors of a page as: @Html.ValidationSummary To display validation summary we need to add this helper class in our view as: @Html.ValidationSummary(false, "", new { @class = "text-danger" }) We can also display the custom error message using ValidationSummary. For this, we need to add the custom error messages to the ModelState in the respective action method. Example: if (ModelState.IsValid) {
bool nameExists = * check here *
if(nameExists)
{
ModelState.AddModelError(string.Empty, "Name already exists.");
return View(name);
}} A staple in Spring MVC interview questions with answers, be prepared to answer this one using your hands-on experience. This is also one of the top interview questions to ask an MVC.