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?
return value is IList {Count: > 0};
– Portentous