In an MVC project I need to validate number of pages of a book using Data Annotations method like following coding sample. Number of pages can be an even integer anything between 0 to 9998 inclusive.
[DisplayName("Pages (Including Cover):")]
[RegularExpression("reg_ex_string",ErrorMessage="Invalid Value")]
public int pages { get; set; }
Your help would be much appreciated.