TRangeValidator tests whether the value of an input component is within a specified range.
The TRangeValidator component uses three key properties to perform its validation. The MinValue and MaxValue properties specify the minimum and maximum values of the valid range. The ValueType property is used to specify the data type of the values to compare. The values to compare are converted to this data type before the validation operation is performed. The following value types are supported:
Integer A 32-bit signed integer data type.
Double A double-precision floating point number data type.
Currency A decimal data type that can contain currency symbols.
Date A date data type. The format follows the GNU date syntax.
String A string data type.
Namespace: System.Web.UI.WebControls
Properties
MinValue, string, kept in viewstate
Gets or sets the minimum value of the validation range.
MaxValue, string, kept in viewstate
Gets or sets the maximum value of the validation range.
ValueType, string, default=String, kept in viewstate
Gets or sets the data type (Integer, Double, Currency, Date, String)
that the values being compared are converted to before the comparison is made.
Set the anchor ID for the error message link. If the value is "true" then the ID of the ControlToValidate will be used otherwise the given value will be used as the anchor.
This method overrides the parent's implementation.
The validation succeeds if the input data is within the range. The validation always succeeds if ControlToValidate is not specified or the input data is empty.