class IntegerField(**kwargs) [source]
- Default widget:
NumberInputwhenField.localizeisFalse, elseTextInput. - Empty value:
None - Normalizes to: A Python integer or long integer.
- Validates that the given value is an integer. Leading and trailing whitespace is allowed, as in Python’s
int()function. - Error message keys:
required,invalid,max_value,min_value
The max_value and min_value error messages may contain %(limit_value)s, which will be substituted by the appropriate limit.
Takes two optional arguments for validation:
-
max_value
-
min_value
These control the range of values permitted in the field.
Please login to continue.