title: Bypass required attribute in ASP.NET MVC
body: <p>In class I have this :</p>
  
  <pre><code>public class CustomerMvc 
  {
      public int Id { get; set; }
  
      [Required(ErrorMessage = "LastName mandatory.")]
      public string LastName { get; set; }
  
      [EmailValidation(ErrorMessage = "Email not valid.")]
      public string Email { get; set; }
  }
  </code></pre>
  
  <p>In another class, I have this :</p>
  
  <pre><code>public class CartMvc
  {
      public CustomerMvc Customer { get; set; }
  
      [Required(ErrorMessage = "VAT mandatory.")]
      public int VatId { get; set; }
  }
  </code></pre>
  
  <p>A <code>Save</code> method int the controller, receive a model type <code>CartMvc</code>. The problem is, in this case, I don't want validate the property type <code>CustomerMvc</code> but only <code>VatId</code>.</p>
  
  <p>Is there a way to bypass, in this case, the validation on <code>CustomerMvc</code> ? Other way ?</p>
  
  <p>Thanks,</p>