I added ValidationSummary Html helper for my View Model class which has 5 required fields. And it works got nice red words missing 1, missing 2 etc.
But I need to display just one message not five of them (something like: “Your input is not valid.”). Can this be done with ValidationSummary?
I added ValidationSummary Html helper for my View Model class which has 5 required
Share
You have two options (at least):
Either use the validation summary and exclude property errors:
or associate a error message with a custom key in your action:
and display it on your page: