aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/fields.py
diff options
context:
space:
mode:
Diffstat (limited to 'rest_framework/fields.py')
-rw-r--r--rest_framework/fields.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/rest_framework/fields.py b/rest_framework/fields.py
index 98768d72..cdcb0ee9 100644
--- a/rest_framework/fields.py
+++ b/rest_framework/fields.py
@@ -137,7 +137,8 @@ def humanize_field(field):
'type': humanize_field_type(field.__class__),
'required': getattr(field, 'required', False),
}
- optional_attrs = ['read_only', 'help_text', 'label']
+ optional_attrs = ['read_only', 'help_text', 'label',
+ 'min_length', 'max_length']
for attr in optional_attrs:
if getattr(field, attr, None) is not None:
humanized[attr] = getattr(field, attr)