I'm using WebApi model validation to validate my request to only accept integer in the body by doing this:
[Range(0,10)]
public int AwesomeLevel { get; set; }
But if i send in a string value, the validation does not fail and the AwesomeLevel is set to 0.
AwesomeLevel="NotValid"
How can I make sure my validation will fail when a non integer value, in this case a string, is sent for this property?