MVC3 Validation - Require One From Group

后端 未结 4 2216
梦毁少年i
梦毁少年i 2020-11-29 19:28

Given the following viewmodel:

public class SomeViewModel
{
  public bool IsA { get; set; }
  public bool IsB { get; set; }
  public bool IsC { get; set; } 
         


        
4条回答
  •  刺人心
    刺人心 (楼主)
    2020-11-29 20:07

    I know this is an old thread but I just came across the same scenario and found a few solutions and saw one that solves Matt's question above so I thought I would share for those who come across this answer. Check out: MVC3 unobtrusive validation group of inputs

提交回复
热议问题