I am using client side validation and I would like the message below to show only when I have an error. I am trying to use this a general error in case any field is invalid.
Initially I was checking for a List property on page load so I thought of passing a new model. Then the validation summary just appeared. When I changed my code from
return View(new myModel)
to
return View()
the validation summary did not appear on Get. I also added a null check on the model when checking the property so I can use the latter code.