Skip to content

Commit 7c3761f

Browse files
author
Michael Lenahan
committed
#7311 choice_value callback argument can be null
1 parent 52404c9 commit 7c3761f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

reference/forms/types/options/choice_value.rst.inc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ configure the value that will be sent in the API request).
1111
This can be a callable or a property path. See `choice_label`_ for similar usage.
1212
If ``null`` is used, an incrementing integer is used as the name.
1313
14+
If you are using a callable to populate choice_value, you need to check for the
15+
case that the value of the field may be null.
16+
1417
.. caution::
1518
1619
In Symfony 2.7, there was a small backwards-compatibility break with how the

0 commit comments

Comments
 (0)