title: ValidationMessageFor with model and html attribute only - MVC 3
body: <p>Working on a MVC 3 application.</p>
  
  <p>I need to add a class to the validation message html. I mean for span tag.</p>
  
  <p>My Model</p>
  
  <pre><code> [Required(ErrorMessage = "Role Name is required")]
   [RegularExpression(@"^[a-zA-Z ]+$", 
       ErrorMessage = "Only alphabets and spaces allowed")]
   public string RoleName { get; set; }
  </code></pre>
  
  <p>Markup</p>
  
  <pre><code>  &lt;label for="name"&gt;RoleName&lt;/label&gt;
    @Html.TextBoxFor(m =&gt; m.RoleName)
    @Html.ValidationMessageFor(m =&gt; m.RoleName, "some", 
                             new { @class = "immediate" })
  </code></pre>
  
  <blockquote>
    <p>But i could not see overloaded method like
    <strong>@Html.ValidationMessageFor(m => m.RoleName, htmlAttributes)</strong> . if i
    give some text, it is not showing my validaton message entered in
    model. It always shows that some text only.</p>
  </blockquote>
  
  <p>Any fix for this?</p>