title: Manually set unobtrusive validation error on a textbox
body: <p>I'm doing something similar to the remote validation, except that I already make my calls manually via jquery and setup whatever I had to setup.</p>
  
  <p>Now my problem is, if I want to tell the validator that a particular textbox is not valid (and prevents the page from submitting, highlight the textbox, etc). How would I do this from code?</p>
  
  <pre><code>@Html.LabelFor(m =&gt; Model.Slug)
  @Html.TextBoxFor(m =&gt; Model.Slug)
  &lt;span id="UrlMsg" class="field-validation-error" style="display: none;"&gt;&lt;/span&gt;
  
   if (error) {
          $('#UrlMsg').html('This name is already in use.').fadeIn('fast');
          //what should I do here for the rest of the validation?
   }
  </code></pre>