Microsoft MVC : add validation message to summary section

4/1/2014·1 min read
This article shows you how to put your validation message to summary area.

If your page have first name, last name, middle name and phone number and you need to validate these values. Also, you want to show error message together, like following.

What you need to do is very simple, so you need to add two things, one is put Mvc error summary to your razor. And set first parametr to false.

Second things you need to do, is remove your indivual error message.

That's all about to set it up. You could go to following page to check demo.