Skip to content

Commit ff0bb8c

Browse files
committed
minor #11710 [Validator] Documented the "compared_value_path" placeholder (javiereguiluz)
This PR was merged into the 4.4 branch. Discussion ---------- [Validator] Documented the "compared_value_path" placeholder Commits ------- e4880b6 [Validator] Documented the "compared_value_path" placeholder
2 parents 597d74b + e4880b6 commit ff0bb8c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

reference/constraints/_comparison-propertypath-option.rst.inc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,14 @@ It defines the object property whose value is used to make the comparison.
88
For example, if you want to compare the ``$endDate`` property of some object
99
with regard to the ``$startDate`` property of the same object, use
1010
``propertyPath="startDate"`` in the comparison constraint of ``$endDate``.
11+
12+
.. tip::
13+
14+
When using this option, its value is available in error messages as the
15+
``{{ compared_value_path }}`` placeholder. Although it's not intended to
16+
include it in the error messages displayed to end users, it's useful when
17+
using APIs for doing any mapping logic on client-side.
18+
19+
.. versionadded:: 4.4
20+
21+
The ``{{ compared_value_path }}`` placeholder was introduced in Symfony 4.4.

0 commit comments

Comments
 (0)