1
아래에는 세 가지 카테고리가 있습니다.Bools로 데이터 주석
적어도 하나의 부울이 범주별로 선택되도록하려면 유효성 검사를 어떻게 구성합니까?
// 장애인
[Display(Name = "Learning Disabilities")]
public bool LD { get; set; }
[Display(Name = "Developmental Disabilities")]
public bool DD { get; set; }
[Display(Name = "AD/HD")]
public bool ADHD { get; set; }
[Display(Name = "Autism")]
public bool Autism { get; set; }
// 연령 그룹
[Display(Name = "Child")]
public bool child { get; set; }
[Display(Name = "Youth")]
public bool youth { get; set; }
[Display(Name = "Adult")]
public bool adult { get; set; }
// 전략 유형
[Display(Name = "Academic")]
public bool academic { get; set; }
[Display(Name = "Behaviour")]
public bool behaviour { get; set; }
[Display(Name = "Communication")]
public bool communication { get; set; }
[Display(Name = "Social")]
public bool social { get; set; }
가능한 중복 :
는 다음과 같이 모델의 속성이 있습니다. 유효성 검사를 설정하여 모델의 bool 값에 따라 두 필드 중 하나가 필요합니까?] (http://stackoverflow.com/questions/11143151/asp-net-mvc3-how-to-set-validation-to-require- 1 대 2 필드 (bo-on-on-bo) – MarcinJuraszek