title: Make a global message to say that there is an error in one of my input fields in MVC application
body: <p>I have many inputs with multiple validations in the backend.</p>
  <p>For example for the field FileName that the user enter uses these validations :</p>
  <pre><code>public class FileName
      {
          [Required(ErrorMessage = &quot;Must not be empty.&quot;)]
          [RegularExpression(&quot;^[a-zA-Z0-9À-ÿ-_]*$&quot;, ErrorMessage = &quot;Character not allowed.&quot;)]
          [Display(Name = &quot;XML file to save&quot;)]
          public string XmlFileName { get; set; }
      }
  </code></pre>
  <p>Currently i am able to show an error message close to the inputs field, but what if i want to put a global warning that there is errors present in the form at the top of the page.</p>
  <p>I know i could hide/show a div which contains the words &quot;There is an error in the form.&quot;</p>
  <p>But how can i check that an error is present so i need to show the div in the index.cshtml code ?</p>
  <p>To be more clear : my errors still shows next to my input, but there's also an informative message at the top saying that there's errors somewhere in the form.</p>
  <p>Any way to achieve this ? Thanks a lot.</p>