File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -61,9 +61,10 @@ divisor
6161
6262**type **: ``integer `` **default **: ``1 ``
6363
64- If, for some reason, you need to divide your starting value by a number
64+ If you need to divide your starting value by a number
6565before rendering it to the user, you can use the ``divisor `` option.
66- For example::
66+ For example if you store prices as integer in order to avoid `rounding errors `_,
67+ you can transform values in cents automatically::
6768
6869 use Symfony\Component\Form\Extension\Core\Type\MoneyType;
6970 // ...
@@ -139,3 +140,4 @@ money_pattern ``string`` The format to use to display the money, including the
139140============= ========== ===============================================================
140141
141142.. _`3 letter ISO 4217 code` : https://en.wikipedia.org/wiki/ISO_4217
143+ .. _`rounding errors` : https://0.30000000000000004.com/
You can’t perform that action at this time.
0 commit comments