summaryrefslogtreecommitdiff
path: root/docs/ref/validators.txt
diff options
context:
space:
mode:
authorKapil Bansal <kapilbansal.gbpecdelhi@gmail.com>2022-05-12 11:30:47 +0200
committerCarlton Gibson <carlton@noumenal.es>2022-05-12 14:16:52 +0200
commit3a82b5f655446f0ca89e3b6a92b100aa458f348f (patch)
tree6e600054369b9316865b3b5b3ab1838769a2b54e /docs/ref/validators.txt
parent68da6b389c403cb91650754be0e2287696807333 (diff)
Fixed #32559 -- Added 'step_size’ to numeric form fields.
Co-authored-by: Jacob Rief <jacob.rief@uibk.ac.at>
Diffstat (limited to 'docs/ref/validators.txt')
-rw-r--r--docs/ref/validators.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/docs/ref/validators.txt b/docs/ref/validators.txt
index 5fe1384bd8..2a7b85e614 100644
--- a/docs/ref/validators.txt
+++ b/docs/ref/validators.txt
@@ -333,3 +333,15 @@ to, or in lieu of custom ``field.clean()`` methods.
The error code used by :exc:`~django.core.exceptions.ValidationError`
if validation fails. Defaults to ``"null_characters_not_allowed"``.
+
+``StepValueValidator``
+----------------------
+
+.. versionadded:: 4.1
+
+.. class:: StepValueValidator(limit_value, message=None)
+
+ Raises a :exc:`~django.core.exceptions.ValidationError` with a code of
+ ``'step_size'`` if ``value`` is not an integral multiple of
+ ``limit_value``, which can be a float, integer or decimal value or a
+ callable.