This question should have been asked before, but I think the search terms are too general for me to find the answer I'm looking for, so I'll ask it again.
I have a model with a property intand range annotation.
If the user enters something other than int, the check message responds with The value '<bad data>' is not valid for '<property name>'... which is fine, but I want to provide a bit more feedback, i.e. Expecting an integer value in this field..
Since this check is not performed before other validators pay attention, I do not know how (or, if possible) to override this default message for verification.
What are my options?
for the request, I send the code, but there are not many:
[Range(0,65535, ErrorMessage="Port must be between 0 and 65535.")]
public int Port { get; set; }
, , RangeAttribute. .