Is it correct way to use ModelState.Remove to deal with ModelState?
问题 Im working on a big MVC3 web application and have an annoyance regarding the ModelState.IsValid method. ModelState is being used in nearly all of my controllers so to validate the data being posted. The views are all based on ViewModels which contain different classes and these classes obviously contain properties which could be marked as [Required] . The problem i am having is the required properties are sometimes not required and im having to use the ModelState.Remove method so that