title: Range annotation between nothing and 100?
body: <p>I have a [Range] annotation that looks like this:</p>
  
  <pre><code>[Range(0, 100)]
  public int AvailabilityGoal { get; set; }
  </code></pre>
  
  <p>My webpage looks like this:</p>
  
  <pre><code>&lt;%=Html.TextBoxFor(u =&gt; u.Group.AvailabilityGoal)%&gt;
  </code></pre>
  
  <p>It works as it should, I can only enter values between 0 and 100 but I also want the input box to be optional, the user shouldn't get an validation error if the input box is empty. This has nothing to do with the range but because the type is an integer. If the user leaves it empty it should make AvailabilityGoal = 0 but I don't want to force the user to enter a zero.</p>
  
  <p>I tried this but it (obviously) didn't work:</p>
  
  <pre><code>[Range(typeof(int?), null, "100")]
  </code></pre>
  
  <p>Is it possible to solve this with Data Annotations or in some other way?</p>
  
  <p>Thanks in advance.</p>
  
  <p>Bobby</p>