title: MVC unobtrusive range validation of dynamic values
body: <p>I have a value on my model, that must fall within the range of two other values on my model.</p>
  
  <p>For example:</p>
  
  <pre><code>public class RangeValidationSampleModel
  {
      int Value { get; set; }
  
      int MinValue { get; set; }
  
      int MaxValue { get; set; }
  }
  </code></pre>
  
  <p>Of course, I can't pass these Min/MaxValues into my DataAnnotations attributes, as they have to be constant values.</p>
  
  <p>I'm sure I need to build my own validation attribute, but I haven't done this much and can't wrap my mind around how it should work.</p>
  
  <p>I've searched for about an hour, and have seen all sorts of solutions for building custom validation, but can't find anything to solve this particular problem using MVC3 unobtrusive validation.</p>