@@ -30,6 +30,7 @@ To use this field, you must specify *either* ``choices`` or ``choice_loader`` op
3030| Overridden| - `compound `_|
3131| options| - `empty_data `_|
3232| | - `error_bubbling `_|
33+ | | - `trim `_|
3334+-------------+------------------------------------------------------------------------------+
3435| Inherited| - `attr `_|
3536| options| - `by_reference `_|
@@ -106,7 +107,7 @@ method::
106107 'choice_attr' => function($category, $key, $index) {
107108 return ['class' => 'category_'.strtolower($category->getName())];
108109 },
109-
110+
110111 'group_by' => function($category, $key, $index) {
111112 // randomly assign things into 2 groups
112113 return rand(0, 1) == 1 ? 'Group A' : 'Group B';
@@ -323,6 +324,14 @@ error_bubbling
323324Set that error on this field must be attached to the field instead of
324325the parent field (the form in most cases).
325326
327+ trim
328+ ~~~~
329+
330+ **type **: ``boolean `` **default **: ``false ``
331+
332+ The trim is disabled by default for choices values.
333+ The reason is that a value must match a set of predefined one.
334+
326335Inherited Options
327336-----------------
328337