IntegerRangeField
This class provides a specialized form field for handling ranges of integer values. It utilizes an underlying integer field for individual inputs and represents the resulting data as a numeric range object. The field includes built-in validation to ensure that both inputs are valid whole numbers.
Attributes
| Attribute | Type | Description |
|---|---|---|
| default_error_messages | dict = {"invalid": _("Enter two whole numbers.")} | A dictionary containing the default error message for invalid input, specifically instructing the user to enter two whole numbers. |
| base_field | [Field](../../../../forms/fields/field.md?sid=django_forms_fields_field) = forms.IntegerField | The form field class used to validate each individual value within the range, which is set to IntegerField. |
| range_type | class = NumericRange | The Python type used to represent the range of integers, specifically a NumericRange object. |
Constructor
Signature
def IntegerRangeField() - > null
Signature
def IntegerRangeField() - > null