I have this:
[Range(1, 1000, ErrorMessage = "Enter a value between 1 and 1000")]
public object ObjectLimit { get; set; }
Works great, but it doesnt show the error message, it shows some standard "The value '554g' is not valid for the ObjectLimit field."
How do I fix that?
Your setting a range of valid integers, 554g is not an integer.
Looks like you need a RegulagExpression attribute with the correct expression to match 554g as a correct value.
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