From be54b38d951479d27957388da18e530cfb502209 Mon Sep 17 00:00:00 2001 From: Steven Renaux Date: Mon, 17 Mar 2025 13:53:23 +0100 Subject: [PATCH] Update input option for MoneyType --- reference/forms/types/money.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/reference/forms/types/money.rst b/reference/forms/types/money.rst index a02b695abd4..967fe9e4ce4 100644 --- a/reference/forms/types/money.rst +++ b/reference/forms/types/money.rst @@ -83,6 +83,9 @@ input By default, the money value is converted to a ``float`` PHP type. If you need the value to be converted into an integer (e.g. because some library needs money values stored in cents as integers) set this option to ``integer``. +You can also set this option to ``string``, it can be useful if the underlying +data is a string for precision reasons (for example, Doctrine uses strings for +the decimal type). .. versionadded:: 7.1