Skip to content

Commit 2071b0d

Browse files
committed
minor #11082 add form name caution to choice_name option (xabbuh)
This PR was merged into the 3.4 branch. Discussion ---------- add form name caution to choice_name option see symfony/symfony#30398 Commits ------- e4c3795 add form name caution to choice_name option
2 parents 411e9d2 + e4c3795 commit 2071b0d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,10 @@ of the choice views in the template.
99
1010
This can be a callable or a property path. See `choice_label`_ for similar usage.
1111
If ``null`` is used, an incrementing integer is used as the name.
12+
13+
.. caution::
14+
15+
The configured value must be a valid form name. Make sure to only return
16+
valid names when using a callable. Valid form names must be composed of
17+
letters, digits, underscores, dashes and colons and must not start with
18+
a dash or a colon.

0 commit comments

Comments
 (0)