title: ASP.NET MVC custom client date validation, how to get the input name?
body: <p>This is the simplified model :</p>
  
  <pre><code>public class Person {
     public int Id;
     public string Name;
  }
  
  public class Task {
    public int Id;
    public int PersonId;
    public DateTime StartDate;
    [GreaterThan("StartDate")]
    public DateTime EndDate;
  }
  </code></pre>
  
  <p>To validate the EndDate >= StartDate, i write general <strong>GreaterThanAttribute</strong>. The server side is trivial, but i have problem on client side validation.</p>
  
  <p>My GreaterThanAttribute got the other property (ex: "StartDate") from constructor, then i pass this other property name to javascript as validation rule. But it won't work, because the JS will not found this element, because MVC will render &amp; named it as "Task.StartDate", not "StartDate".</p>
  
  <p>My question is, how i can get the prefix which will be used by the controller to render my model inside IClientValidatable.GetClientValidationRules() ?</p>
  
  <p>Thanks</p>