3

I have a class:

public class Product
    public Guid Guid {get;set;}  
   
    [Required]
    public string Brand { get; set; }
}

I want to specify what values are legal values for property Brand, for instance "Audi,BMW,Mercedes". Is that is possible to do without custom validator?

Yoda
  • 17,363
  • 67
  • 204
  • 344

0 Answers0