I'm decorated a ViewModel in my ASP.NET MVC 2 site with System.ComponentModel.DataAnnotations
validation attributes. For one of my fields, named Price, I want to validate that the value is not below some extent, in this case 0.
I know that RangeAttribute
exists for validation with a lower and an upper extent, but does something like a MinimumValueAttribute
exist for validation with only a lower extent?
If not, I guess I'll just roll my own.
RangeAttribute
is doing client-side validation. :) – GaelMicrosoftMvcValidation.js
, and then recompile it specifically for your app. – Neapolitan