title: ASP.NET MVC3 using both Model and custom ValidationModel in View
body: <p>I have a View like this (unimportant stuff left out):</p>
  
  <pre><code>@model MyProject.Models.Accounts
  
          &lt;div class="editor-label"&gt;
              @Html.LabelFor(model =&gt; model.Name)
          &lt;/div&gt;
          &lt;div class="editor-field"&gt;
              @Html.EditorFor(model =&gt; model.Name)
          &lt;/div&gt;
  </code></pre>
  
  <p>Now, I have a separate Model I want to use for validation. Is it possible to use both my Model for data AND this validation Model in a View? Something like this:</p>
  
  <pre><code>@model MyProject.Models.Accounts
  @validaitonmodel MyProject.Models.AccountValidationModel
  
              &lt;div class="editor-label"&gt;
                  @Html.LabelFor(model =&gt; model.Name)
              &lt;/div&gt;
              &lt;div class="editor-field"&gt;
                  @Html.EditorFor(model =&gt; model.Name)
                  @Html.ValidationMessageFor(validationmodel =&gt; validationmodel.Name)
              &lt;/div&gt;
  </code></pre>
  
  <p>Thanks in advance.</p>
  
  <p><em><strong>EDIT</em></strong></p>
  
  <p>By "Model" I mean the models that are automaticly generated by the .edmx (the Ado.net self-tracking entities)</p>
  
  <p>By ValidationModel I mean a custom class like this:</p>
  
  <pre><code>public class AccountValidationModel
  {
      [Required]
      public String Name {get; set;}
  }
  </code></pre>