I have scenario where i need to apply either one(Email or Phone) has required field. Both Can not be null or Empty.
This is my Class.
public class Contact
{
public Email Email {get; set;}
public Phone Phone {get; set;}
}
public class Email
{
[Required]
public string EmailAddress {get;set;}
}
public class Phone
{
[Required]
public int CountryCode {get; set;}
[Required]
public string Number {get; set;}
}