[Bind(Exclude = "Password")]
In this way, by add exclusions to your action and explicitly state what can and can't be binded we can achieve in ASP.NET MVC
public class Person
{
public int id { get; set; }
[Required]
public string FirstName { get; set; }
[Required]
public string LastName { get; set; }
}
FirstName And LastName are Requerd. I want to exclude LastName from validating:
public ActionResult Edit([Bind(Exclude = "LastName")]Person person)
{
//your code for ModalState validation;
}