title: Data Annotation attributes are not firing in WCF
body: <p>I am trying to validate the <code>WCF</code> service request using <code>System.ComponentModel.DataAnnotations.dll</code> of Version v4.0.30319. I am using <code>VS2010</code> with <code>Target Framework</code> <code>v4.0</code>.</p>
  
  <p>Below are my sample request(s). If i invoke the service operation using <code>WcfTestclient</code> the annotations are not firing even if i pass the invalid values (<code>null</code>/<code>String.Empty</code>/<code>""</code>) for <code>Name</code>.</p>
  
  <p><strong>Request1</strong>:</p>
  
  <pre><code>[MessageContract]
  public class  AddUserRequest
  {
      [MessageBodyMember]
      [Required(ErrorMessage = "Id is required.")]
      public int Id { get; set; }
  
      [MessageBodyMember]
      [Required(ErrorMessage = "Name is required.")]
      [StringLength(100, MinimumLength = 10, ErrorMessage = "Name length should be between 10 and 100")]
      public string Name { get; set; }
  }
  </code></pre>
  
  <p><strong>Request2</strong>:</p>
  
  <pre><code>[DataContract]
  public class User
  {
      [DataMember(IsRequired = true)]
      [Required(ErrorMessage = "Id is required.")]
      public int Id { get; set; }
  
      [DataMember(IsRequired = true)]
      [Required(ErrorMessage = "Name is required.")]
      [StringLength(100, MinimumLength = 10, ErrorMessage = "Name length should be between 10 and 100")]
      public string Name { get; set; }
  }
  </code></pre>
  
  <p>Is i am missing some thing over here ?. Please suggest.</p>