Hi Team,
I tried model validation for integer as below: where it is not working for null or empty field
1) [Required]
public int? UsecaseID { get; set; }
2) [Range(1, int.MaxValue, ErrorMessage = "Value for {0} must be between {1} or {2} or {3}.")]
public int UsecaseID { get; set; }
Please assist me with any other option?

Basem AlshabaniRank #3,323 · 432 reputationPosted Sep 16, 2021, 11:29 AM EDT
Sachin SinghRank #66 · 26.2K reputationPosted Sep 16, 2021, 12:13 PM EDT
Basem AlshabaniRank #3,323 · 432 reputationPosted Sep 17, 2021, 12:45 PM EDT