1
0
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:
Srinivas Reddy Thatiparthy
2017-08-08 20:32:08 +05:30
committed by Tim Graham
parent 81e357a7e1
commit 55b5393bd2
4 changed files with 26 additions and 3 deletions

View File

@@ -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`.