title: ASP.NET MVC data annotations attribute Range set from another property value
body: <p>Hi I have following in my Asp.net MVc Model</p>
  
  <p>TestModel.cs</p>
  
  <pre><code>public class TestModel
  {      
  public double OpeningAmount { get; set; }
  
  [Required(ErrorMessage="Required")]
  [Display(Name = "amount")]
  [Range(0 , double.MaxValue, ErrorMessage = "The value must be greater than 0")]
  public string amount { get; set; }
  
  }
  </code></pre>
  
  <p>Now from my controller "OpeningAmount " is assign .</p>
  
  <p>Finaly when I submit form I want to check that "amount" must be greater than "OpeningAmonut" . so want to set Range dynamically like</p>
  
  <pre><code>[Range(minimum = OpeningAmount , double.MaxValue, ErrorMessage = "The value must be greater than 0")]
  </code></pre>
  
  <p>I do not want to use only Jquery or javascript because it will check only client side so possible I can set Range attribute minimum dynamically than it would be great for.</p>