# Input Validation

## Content



You can use the [Minimum](/componentone/api/wpf/online-input-net/dotnet-api/C1.WPF.Input/C1.WPF.Input.C1NumericBox.Minimum.html) and [Maximum](/componentone/api/wpf/online-input-net/dotnet-api/C1.WPF.Input/C1.WPF.Input.C1NumericBox.Maximum.html) properties to set a numeric range that users are limited to at run time. If the **Minimum** and **Maximum** properties are set, users will not be able to pick a number smaller than the **Minimum** or larger than the **Maximum**.

When setting the **Minimum** and **Maximum** properties, the **Minimum** should be smaller than the **Maximum**. Also be sure to set the **Value** property to a number within the **Minimum** and **Maximum** range.

You can also choose a mode for range validation using the [RangeValidationMode](/componentone/api/wpf/online-input-net/dotnet-api/C1.WPF.Input/C1.WPF.Input.C1NumericBox.RangeValidationMode.html) property. This property controls when the entered number is validated. You can set **RangeValidationMode** to one of the following options:

| **Option** | **Description** |
| --- | --- |
| Always | This mode does not allow users to enter out of range values. |
| AlwaysTruncate | This mode does not allow users to enter out of range values. The value will be truncated if the limits are exceeded. |
| OnLostFocus | This mode truncates the value when the control loses focus. |