Kendo numberic textbox is not showing my Range validator message. It Always showing "Please enter a value less than or equal to 100." But i want to change it to my defined message. How can i change range validator message? How can i show my defined message "Length should be 1-100"?
Code:
[Required(ErrorMessage = "Enter length")]
[Range(1, 100, ErrorMessage = "Length should be 1-100")]
public double? Length { get; set; }
Required errormessage ("Enter length") is showing properly but range errormessage("Length should be 1-100") is not showing. It Always showing "Please enter a value less than or equal to 100."
Data Annotations:
Razor Markup:
Try this:
This generates the following HTML:
And it shows your desired message if you enter a number greater than 100.
What about this?
Hm, don´t know if I understand you correctly but for me this works:
If the user clicks submit without any inputs the required message appers. If the user fill in something else than numbers than the validation message appears.