From e4880b67b5b59a9d2d16f554c60117f7a7c1370f Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Mon, 10 Jun 2019 13:19:47 +0200 Subject: [PATCH] [Validator] Documented the "compared_value_path" placeholder --- .../_comparison-propertypath-option.rst.inc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/reference/constraints/_comparison-propertypath-option.rst.inc b/reference/constraints/_comparison-propertypath-option.rst.inc index a2acc52ef5c..66932a0e983 100644 --- a/reference/constraints/_comparison-propertypath-option.rst.inc +++ b/reference/constraints/_comparison-propertypath-option.rst.inc @@ -8,3 +8,14 @@ It defines the object property whose value is used to make the comparison. For example, if you want to compare the ``$endDate`` property of some object with regard to the ``$startDate`` property of the same object, use ``propertyPath="startDate"`` in the comparison constraint of ``$endDate``. + +.. tip:: + + When using this option, its value is available in error messages as the + ``{{ compared_value_path }}`` placeholder. Although it's not intended to + include it in the error messages displayed to end users, it's useful when + using APIs for doing any mapping logic on client-side. + + .. versionadded:: 4.4 + + The ``{{ compared_value_path }}`` placeholder was introduced in Symfony 4.4.