Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d5b2949

Browse filesBrowse 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
Copy full SHA for d5b2949

File tree

Expand file treeCollapse file tree

1 file changed

+10
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+10
-3
lines changed

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

Copy file name to clipboardExpand all lines: reference/forms/types/options/error_mapping.rst.inc
+10-3Lines changed: 10 additions & 3 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.