1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #30757 -- Added a system check to ensure max_length fits the longest choice.

This commit is contained in:
Nick Pope
2019-09-04 09:21:08 +01:00
committed by Mariusz Felisiak
parent fee75d2aed
commit b6251956b6
3 changed files with 45 additions and 0 deletions

View File

@@ -138,6 +138,8 @@ Model fields
* **fields.E006**: ``db_index`` must be ``None``, ``True`` or ``False``.
* **fields.E007**: Primary keys must not have ``null=True``.
* **fields.E008**: All ``validators`` must be callable.
* **fields.E009**: ``max_length`` is too small to fit the longest value in
``choices`` (``<count>`` characters).
* **fields.E100**: ``AutoField``\s must set primary_key=True.
* **fields.E110**: ``BooleanField``\s do not accept null values. *This check
appeared before support for null values was added in Django 2.1.*