Model validation with enumerations
- by Robert Koritnik
I'm using DataAnnotations attributes to validate my model objects. My model class looks similar to this:
public class MyModel
{
[Required]
public string Title { get; set; }
[Required]
public List<User> Editors { get; set; }
}
public class User
{
public int Id { get; set; }
[Required]
public string FullName {…