Skip to content

Commit b7718ab

Browse files
authored
docs: add required decimal type in min_value and max_value in DecimalField (#2)
1 parent 62dccca commit b7718ab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/api-guide/fields.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -291,8 +291,8 @@ Corresponds to `django.db.models.fields.DecimalField`.
291291
* `max_digits` The maximum number of digits allowed in the number. It must be either `None` or an integer greater than or equal to `decimal_places`.
292292
* `decimal_places` The number of decimal places to store with the number.
293293
* `coerce_to_string` Set to `True` if string values should be returned for the representation, or `False` if `Decimal` objects should be returned. Defaults to the same value as the `COERCE_DECIMAL_TO_STRING` settings key, which will be `True` unless overridden. If `Decimal` objects are returned by the serializer, then the final output format will be determined by the renderer. Note that setting `localize` will force the value to `True`.
294-
* `max_value` Validate that the number provided is no greater than this value.
295-
* `min_value` Validate that the number provided is no less than this value.
294+
* `max_value` Validate that the number provided is no greater than this value. It must be `Decimal` type.
295+
* `min_value` Validate that the number provided is no less than this value. It must be `Decimal` type.
296296
* `localize` Set to `True` to enable localization of input and output based on the current locale. This will also force `coerce_to_string` to `True`. Defaults to `False`. Note that data formatting is enabled if you have set `USE_L10N=True` in your settings file.
297297
* `rounding` Sets the rounding mode used when quantizing to the configured precision. Valid values are [`decimal` module rounding modes][python-decimal-rounding-modes]. Defaults to `None`.
298298
* `normalize_output` Will normalize the decimal value when serialized. This will strip all trailing zeroes and change the value's precision to the minimum required precision to be able to represent the value without loosing data. Defaults to `False`.

0 commit comments

Comments
 (0)