class CharField(**kwargs)
[source]
- Default widget:
TextInput
- Empty value:
''
(an empty string) - Normalizes to: A Unicode object.
- Validates
max_length
ormin_length
, if they are provided. Otherwise, all inputs are valid. - Error message keys:
required
,max_length
,min_length
Has three optional arguments for validation:
-
max_length
-
min_length
If provided, these arguments ensure that the string is at most or at least the given length.
-
strip
-
New in Django 1.9.
If
True
(default), the value will be stripped of leading and trailing whitespace.
Please login to continue.