title: Nancy Model Binding Required Attribute Validation Not Working
body: <p>I'm using NancyFx model binding through the routing url and am trying to set up some validation for required properties. Class is as follows:</p>
  
  <pre><code>public class Query
  {
      [Required]
      public string ClientId { get; set; }
      public List&lt;string&gt; Customers { get; set; }
  }
  </code></pre>
  
  <p>My route is as follows:</p>
  
  <pre><code>Get["/test?customers=c1,c2"] = args =&gt;
          {
              var query = new Query(); // A
  
              try
              {
                  query = this.Bind&lt;Query&gt;(); // B
              }
              catch (ModelBindingException ex)
              {
                  throw ex;
              }
  
              return db.Execute(Query);
          };
      }
  </code></pre>
  
  <p>At A, I expected there to be some sort of exception since ClientId is required but it is null when a new Query is initialized, but there is nothing.</p>
  
  <p>Failing that, at B, I expected there to be some sort of error when I try to bind the Query object. Looking att he debugger, the query object's Customers property correctly has the expected value of "c1,c2". However, the ClientId in the query object is null, and there is no error. Am wondering what I can do to trigger an exception based on the fact that ClientId is required.</p>