mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-05 04:50:12 +03:00
let integerfields handle max_length, although do nothing with it.
This commit is contained in:
parent
15673208a1
commit
eb44302c3d
|
@ -644,6 +644,7 @@ class IntegerField(Field):
|
|||
def __init__(self, **kwargs):
|
||||
max_value = kwargs.pop('max_value', None)
|
||||
min_value = kwargs.pop('min_value', None)
|
||||
max_length = kwargs.pop('max_length', None) # valid, but ignored.
|
||||
super(IntegerField, self).__init__(**kwargs)
|
||||
if max_value is not None:
|
||||
message = self.error_messages['max_value'].format(max_value=max_value)
|
||||
|
|
Loading…
Reference in New Issue
Block a user