I have the following class:
public class CreateJob
{
[Required]
public int JobTypeId { get; set; }
public string RequestedBy { get; set; }
public JobTask[] TaskDescriptions { get; set; }
}
I'd like to have a data annotation above TaskDescriptions
so that the array must contain at least one element? Much like [Required]
. Is this possible?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…