0

Is it possible to set any global defaults for use with the @Html.ValidationSummary?

We're using it throughout our solution and want it always to show the same text. For example, we can achieve the text as follows:

@Html.ValidationSummary(False, "Validation Errors Occured")

However, we want to avoid the developer needing to specify the text. Instead, we'd like them to simply code as follows:

@Html.ValidationSummary()
DavidReid
  • 449
  • 1
  • 5
  • 21

1 Answers1

0

Not providing you exact answer you are looking but you can create new extension method as per your need for validation summary. and use that method across the site for validation summary. You will have more control on your create code.
Have a look at this post how James created new method for it.

Community
  • 1
  • 1
par
  • 1,061
  • 1
  • 11
  • 29