diff options
| author | buzzi <buzzi.javier@gmail.com> | 2018-10-17 14:52:19 +0000 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2018-10-22 10:26:54 -0400 |
| commit | 24cae0bedc51093b363c323af555946a8edea1a1 (patch) | |
| tree | 39afc03c2f0ee34844ae383d1044e89e2607c726 /docs/ref/validators.txt | |
| parent | 5e3463f6bcec818431f0e1f4649d6a5bd944c459 (diff) | |
Fixed #29860 -- Allowed BaseValidator to accept a callable limit_value.
Diffstat (limited to 'docs/ref/validators.txt')
| -rw-r--r-- | docs/ref/validators.txt | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/docs/ref/validators.txt b/docs/ref/validators.txt index 6294d519f8..b6a233014d 100644 --- a/docs/ref/validators.txt +++ b/docs/ref/validators.txt @@ -236,7 +236,12 @@ to, or in lieu of custom ``field.clean()`` methods. .. class:: MaxValueValidator(limit_value, message=None) Raises a :exc:`~django.core.exceptions.ValidationError` with a code of - ``'max_value'`` if ``value`` is greater than ``limit_value``. + ``'max_value'`` if ``value`` is greater than ``limit_value``, which may be + a callable. + + .. versionchanged:: 2.2 + + ``limit_value`` can now be a callable. ``MinValueValidator`` --------------------- @@ -244,7 +249,12 @@ to, or in lieu of custom ``field.clean()`` methods. .. class:: MinValueValidator(limit_value, message=None) Raises a :exc:`~django.core.exceptions.ValidationError` with a code of - ``'min_value'`` if ``value`` is less than ``limit_value``. + ``'min_value'`` if ``value`` is less than ``limit_value``, which may be a + callable. + + .. versionchanged:: 2.2 + + ``limit_value`` can now be a callable. ``MaxLengthValidator`` ---------------------- @@ -252,7 +262,12 @@ to, or in lieu of custom ``field.clean()`` methods. .. class:: MaxLengthValidator(limit_value, message=None) Raises a :exc:`~django.core.exceptions.ValidationError` with a code of - ``'max_length'`` if the length of ``value`` is greater than ``limit_value``. + ``'max_length'`` if the length of ``value`` is greater than + ``limit_value``, which may be a callable. + + .. versionchanged:: 2.2 + + ``limit_value`` can now be a callable. ``MinLengthValidator`` ---------------------- @@ -260,7 +275,12 @@ to, or in lieu of custom ``field.clean()`` methods. .. class:: MinLengthValidator(limit_value, message=None) Raises a :exc:`~django.core.exceptions.ValidationError` with a code of - ``'min_length'`` if the length of ``value`` is less than ``limit_value``. + ``'min_length'`` if the length of ``value`` is less than ``limit_value``, + which may be a callable. + + .. versionchanged:: 2.2 + + ``limit_value`` can now be a callable. ``DecimalValidator`` -------------------- |
