title: Resolving urls from Route Values on server side
body: <p>I am trying to create a ValidationAttribute <em>(for Remote validation which only works on the server side)</em> and inside the IsValid method, I need to resolve the url from url route values. Here is my initial set up : </p>
  
  <pre><code>public class ServerSideRemoteAttribute : ValidationAttribute {
  
      public string Controller { get; set; }
      public string Action { get; set; }
      public object RouteValues { get; set; }
  
      public ServerSideRemoteAttribute(string controller, string action) {
  
          this.Controller = controller;
          this.Action = action;
      }
  
      public ServerSideRemoteAttribute(string controller, string action, object routeValues) {
  
          this.Controller = controller;
          this.Action = action;
          this.RouteValues = routeValues;
      }
  
      protected override ValidationResult IsValid(object value, ValidationContext validationContext) {
  
          //Here I need to resolve the url in order to make a call to that controller action and get the JSON result back
  
          return base.IsValid(value, validationContext);
      }
  }
  </code></pre>
  
  <p>Any thoughts?</p>