[Required(ErrorMessage = "You need to add your phone number")]
public string PhoneNumber { get; set; }
I want to allow numbers only and display error message if it's not a number. I also want to limit it to only 10 digits. How exactly can I do that? Thanks
[RegularExpression]attribute.