You can create your own validator, for example like this:
public class RequiredGreaterThanZero : ValidationAttribute {
Then include this file in your model and use it as an attribute:
[RequiredGreaterThanZero] [DisplayName("Driver")] public int DriverID { get; set; }
I usually use this when checking a dropdown.
John Lord Apr 17 '19 at 20:25 2019-04-17 20:25
source share