0

There is Data Annotation Attribute [Phone]. It works fine for string property, but not works for IList<string> property.

public class TestDTO
{
    [Phone]
    public string Phone { get; set; } // Works ok

    [Phone]
    public IList<string> Phones { get; set; } // Not working
}

How to apply [Phone] attribute to IList<string> property?

Phil
  • 82
  • 8

0 Answers0