mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #28474 -- Made DurationField raise ValidationError for inputs that raised OverflowError.
This commit is contained in:
committed by
Tim Graham
parent
81e357a7e1
commit
55b5393bd2
@@ -566,8 +566,9 @@ For each field, we describe the default widget used if you don't specify
|
||||
* Empty value: ``None``
|
||||
* Normalizes to: A Python :class:`~python:datetime.timedelta`.
|
||||
* Validates that the given value is a string which can be converted into a
|
||||
``timedelta``.
|
||||
* Error message keys: ``required``, ``invalid``.
|
||||
``timedelta``. The value must be between :attr:`datetime.timedelta.min`
|
||||
and :attr:`datetime.timedelta.max`.
|
||||
* Error message keys: ``required``, ``invalid``, ``overflow``.
|
||||
|
||||
Accepts any format understood by
|
||||
:func:`~django.utils.dateparse.parse_duration`.
|
||||
|
||||
Reference in New Issue
Block a user