Skip to content

Commit d5b2949

Browse files
committed
feature #6156 [reference] [form] [options] fix #6153 (HeahDude)
This PR was squashed before being merged into the 2.3 branch (closes #6156). Discussion ---------- [reference] [form] [options] fix #6153 | Q | A | ------------- | --- | Doc fix? | yes | New docs? | no | Applies to | 2.3+ | Fixed tickets | #6153 Commits ------- a15f856 [reference] [form] [options] fix #6153
2 parents d6958d6 + a15f856 commit d5b2949

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

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

+10-3
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,14 @@ Here are the rules for the left and the right side of the mapping:
3434
object, the property path is ``[indexName]``;
3535
* You can construct nested property paths by concatenating them, separating
3636
properties by dots. For example: ``addresses[work].matchingCityAndZipCode``;
37-
* The left side of the error mapping also accepts a dot ``.``, which refers
38-
to the field itself. That means that any error added to the field is added
39-
to the given nested field instead;
4037
* The right side contains simply the names of fields in the form.
38+
39+
Additionally, you can set the left side to dot (``.``), which refers to any
40+
unmapped property or method needing validation to the given nested field instead
41+
of bubbling them to the form::
42+
43+
$resolver->setDefaults(array(
44+
'error_mapping' => array(
45+
'.' => 'city',
46+
),
47+
));

0 commit comments

Comments
 (0)