I have a Quantity
column in my table in SQL Server 2008. But I want to write a data annotation in my asp.net mvc web application that checks if the entered value is greater than or equal to 1? So can anyone tell me which data annotation to use?
Thanks
does this work?
[Range(1, Int32.MaxValue, ErrorMessage = "Value should be greater than or equal to 1")]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With