From 633f6542f7f8a5a43cf0dc235b333da6fc520991 Mon Sep 17 00:00:00 2001 From: Jules Pietri Date: Sat, 16 Jan 2016 16:17:28 +0100 Subject: [PATCH 1/3] [reference] [form] [options] fix #6153 --- reference/forms/types/options/error_mapping.rst.inc | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/reference/forms/types/options/error_mapping.rst.inc b/reference/forms/types/options/error_mapping.rst.inc index 5be15490508..f8d99890c21 100644 --- a/reference/forms/types/options/error_mapping.rst.inc +++ b/reference/forms/types/options/error_mapping.rst.inc @@ -34,7 +34,14 @@ Here are the rules for the left and the right side of the mapping: object, the property path is ``[indexName]``; * You can construct nested property paths by concatenating them, separating properties by dots. For example: ``addresses[work].matchingCityAndZipCode``; -* The left side of the error mapping also accepts a dot ``.``, which refers - to the field itself. That means that any error added to the field is added - to the given nested field instead; * The right side contains simply the names of fields in the form. + +Additionally, you can set the left side to dot ``.`` which refers to any +unmapped property or methods needing validation to the given nested field instead +of bubbling them to the form:: + + $resolver->setDefaults(array( + 'error_mapping' => array( + '.' => 'city', + ), + )); From 7b1cdb15feee2110552f34a2f1aa6698559086ef Mon Sep 17 00:00:00 2001 From: Jules Pietri Date: Tue, 19 Jan 2016 15:28:29 +0100 Subject: [PATCH 2/3] fix typo --- reference/forms/types/options/error_mapping.rst.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reference/forms/types/options/error_mapping.rst.inc b/reference/forms/types/options/error_mapping.rst.inc index f8d99890c21..e0d5ce37d60 100644 --- a/reference/forms/types/options/error_mapping.rst.inc +++ b/reference/forms/types/options/error_mapping.rst.inc @@ -36,8 +36,8 @@ Here are the rules for the left and the right side of the mapping: properties by dots. For example: ``addresses[work].matchingCityAndZipCode``; * The right side contains simply the names of fields in the form. -Additionally, you can set the left side to dot ``.`` which refers to any -unmapped property or methods needing validation to the given nested field instead +Additionally, you can set the left side to dot (``.``), which refers to any +unmapped properties or methods needing validation to the given nested field instead of bubbling them to the form:: $resolver->setDefaults(array( From 16a794f0851b1bd2aed2b28d81d66d40800881e7 Mon Sep 17 00:00:00 2001 From: Jules Pietri Date: Wed, 20 Jan 2016 16:24:49 +0100 Subject: [PATCH 3/3] fix typo --- reference/forms/types/options/error_mapping.rst.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/forms/types/options/error_mapping.rst.inc b/reference/forms/types/options/error_mapping.rst.inc index e0d5ce37d60..1d71c390bf3 100644 --- a/reference/forms/types/options/error_mapping.rst.inc +++ b/reference/forms/types/options/error_mapping.rst.inc @@ -37,7 +37,7 @@ Here are the rules for the left and the right side of the mapping: * The right side contains simply the names of fields in the form. Additionally, you can set the left side to dot (``.``), which refers to any -unmapped properties or methods needing validation to the given nested field instead +unmapped property or method needing validation to the given nested field instead of bubbling them to the form:: $resolver->setDefaults(array(