10000 minor #13138 Add doc for rounding_mode (VincentLanglet) · symfony/symfony-docs@efc8f70 · GitHub
[go: up one dir, main page]

Skip to content

Commit efc8f70

Browse files
committed
minor #13138 Add doc for rounding_mode (VincentLanglet)
This PR was merged into the master branch. Discussion ---------- Add doc for rounding_mode Related to symfony/symfony#35729 Commits ------- fcc8641 Add doc for rounding_mode
2 parents 155bc6e + fcc8641 commit efc8f70

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

reference/forms/types/percent.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ the input.
1818
| Options | - `scale`_ |
1919
| | - `symbol`_ |
2020
| | - `type`_ |
21+
| | - `rounding_mode`_ |
2122
+-------------+-----------------------------------------------------------------------+
2223
| Overridden | - `compound`_ |
2324
| options | |
@@ -55,8 +56,12 @@ scale
5556

5657
**type**: ``integer`` **default**: ``0``
5758

58-
By default, the input numbers are rounded. To allow for more decimal places,
59-
use this option.
59+
This specifies how many decimals will be allowed until the field rounds
60+
the submitted value (via ``rounding_mode``). For example, if ``scale`` is set
61+
to ``2``, a submitted value of ``20.123`` will be rounded to, for example,
62+
``20.12`` (depending on your `rounding_mode`_).
63+
64+
.. include:: /reference/forms/types/options/rounding_mode.rst.inc
6065

6166
symbol
6267
~~~~~~

0 commit comments

Comments
 (0)
0