title: Remote validation restrict for edit controller method
body: <p>I have model for register </p>
  
  <p>my model class</p>
  
  <pre><code>public class RegisterViewModel
  {
  
  
      [Required]
      [StringLength(100, ErrorMessage = "Please enter a minimum of {2} characters", MinimumLength = 6)]
      [DisplayName("University ID")]
      [Remote("doesusernameExist", "HEC",null, ErrorMessage = "usr name is allready exist", HttpMethod = "POST")]
      public string usrname { get; set; }    }
  </code></pre>
  
  <p>my json controller class</p>
  
  <pre><code> [HttpPost]
      public JsonResult doesusernameExist(string usrname)
      {
  
           var institute = db.Institutes.Find(HEI_ID);
                     return Json(institute == null);
  
  
      }
  </code></pre>
  
  <p>for create new user and edit user I'm using above model . so without create another model , I want to disable doesusernameExist calling method in edit method </p>