Example of Range Validation in ASP.NET MVC Numeric Textbox Control

This sample demonstrates the range validation functionalities of the Numeric TextBox. Change the min, max and step values and click on apply button to change the property values in Numeric TextBox.

DEMO
SOURCE
Numeric TextBox
Min Value
Max Value
Increment Step

The NumericTextBox has the options to restrict the input value between a specific range using the minopens in a new tab, maxopens in a new tab, and strictModeopens in a new tab properties.

  • When you enable the strictMode property, the value will automatically change within a range on passing the out-of-range values.
  • When you disable the strictMode property, the NumericTextBox component allows the out-of-range value with the highlighted textbox to indicate the given value is wrong.

In this demo, numeric textbox is restricted between 10 to 100 through the min and max properties. So you can enter only the value between this range.

More information on the range validation configuration can be found in the documentation sectionopens in a new tab.

Transform your ASP.NET MVC web apps today with Syncfusion® ASP.NET MVC components
85+ high-performance and responsive UI components
Dedicated support
Hassle-free licensing
TRY IT FOR FREE
opens in a new tab